Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Jenkins Path Traversal / Arbitrary File Write

Medium

Synopsis

Tenable discovered that the patch for CVE-2018-1000406 (SECURITY-1074) is inadequate.

CVE-2019-10352: Path Traversal Arbitrary File Write

A path traversal vulnerability exists in core/src/main/java/hudson/model/FileParameterValue.java that allows authenticated attackers with Job/Configure permission to define a file parameter with a file name outside the intended directory, resulting in an arbitrary file write on the Jenkins master when scheduling a build.

Proof of Concept

Below is a series of instructions to follow in order to reproduce the vulnerability:

  1. Download Jenkins latest weekly from http://mirrors.jenkins.io/war/latest/jenkins.war. At the time of this writing, this is 2.180.
  2. Start Jenkins (java -jar jenkins.war) and browse to http://<server>:8080/
  3. Follow the on screen instructions to begin using Jenkins (initialAdminPW, default plugins etc.).
  4. Create a user and give them overall read and job build, configure & read permissions.
  5. Create a new "Freestyle Project" named test (the workspace for this project will be located at JENKINS_HOME/workspace/test)
  6. Log out of admin user and in as the restricted permission user created above.
  7. Select the project and click configure on the left.
  8. Tick the "This build is parameterised" box and select File Parameter.
  9. For the file location enter: 'dir/../../../pwned' and click save.
  10. Click build with parameters and select the file you wish to upload.
  11. With the path supplied above, the file will be written to the JENKINS_HOME/workspace directory (it is the intended behaviour that it should only be permitted to be written under the project workspace - in this case JENKINS_HOME/workspace/test). However, it may be written to anywhere on the filesystem that the user running Jenkins has permission to write.
The original fix disallowed absolute / relative paths. However, the above path bypasses their validation.

Solution

Upgrade to Jenkins 2.186.

Disclosure Timeline

06/13/2019 - Vulnerability discovered.
06/13/2019 - Vulnerability reported to Jenkins using issue tracker. 90-day date is 9/11/19.
06/13/2019 - Jenkins thanks Tenable for the report.
06/13/2019 - Jenkins asks for clarification about affected versions.
06/14/2019 - Tenable provides clarification.
06/14/2019 - Jenkins thanks Tenable.
06/14/2019 - Jenkins says, "Earliest fix release would be 2.176.2 on July 17, latest possible within disclosure schedule 2.xxx.1 on September 11."
06/14/2019 - Tenable thanks Jenkins for the update.
06/14/2019 - Jenkins confirms the vulnerability exists.
07/02/2019 - Tenable asks for an update.
07/02/2019 - Jenkins plans to release a fix on July 17.
07/03/2019 - Tenable thanks Jenkins for the update.
07/12/2019 - Jenkins ticket added CVE-2019-10352.
07/17/2019 - Jenkins security advisory released.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2019-10352
Tenable Advisory ID
TRA-2019-35
Credit

Conor O'Neill

CVSSv2 Base / Temporal Score
4.0 / 3.1
CVSSv2 Vector
(AV:N/AC:L/Au:S/C:N/I:P/A:N)
Affected Products
Jenkins (core) prior to 2.186
Risk Factor
Medium

Advisory Timeline

07/17/2019 - Initial advisory released.
tenable.io

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable.io Vulnerability Management trial also includes Tenable Lumin, Tenable.io Web Application Scanning and Tenable.cs Cloud Security.

tenable.io BUY

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

65 assets

Choose Your Subscription Option:

Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

Nessus® is the most comprehensive vulnerability scanner on the market today.

NEW - Nessus Expert Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Professional Trial.

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Tenable.io

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable.io Vulnerability Management trial also includes Tenable Lumin, Tenable.io Web Application Scanning and Tenable.cs Cloud Security.

Tenable.io BUY

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

65 assets

Choose Your Subscription Option:

Buy Now

Try Tenable.io Web Application Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable.io platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web Application Scanning trial also includes Tenable.io Vulnerability Management, Tenable Lumin and Tenable.cs Cloud Security.

Buy Tenable.io Web Application Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable.io Container Security

Enjoy full access to the only container security offering integrated into a vulnerability management platform. Monitor container images for vulnerabilities, malware and policy violations. Integrate with continuous integration and continuous deployment (CI/CD) systems to support DevOps practices, strengthen security and support enterprise policy compliance.

Buy Tenable.io Container Security

Tenable.io Container Security seamlessly and securely enables DevOps processes by providing visibility into the security of container images – including vulnerabilities, malware and policy violations – through integration with the build process.

Try Tenable Lumin

Visualize and explore your Cyber Exposure, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable.io Vulnerability Management, Tenable.io Web Application Scanning and Tenable.cs Cloud Security.

Buy Tenable Lumin

Contact a Sales Representative to see how Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable.cs

Enjoy full access to detect and fix cloud infrastructure misconfigurations and view runtime vulnerabilities. Sign up for your free trial now. To learn more about the trial process click here.

Your Tenable.cs Cloud Security trial also includes Tenable.io Vulnerability Management, Tenable Lumin and Tenable.io Web Application Scanning.

Contact a Sales Rep to Buy Tenable.cs

Contact a Sales Representative to learn more about Tenable.cs Cloud Security and see how easy it is to onboard your cloud accounts and get visibility into both cloud misconfigurations and vulnerabilities within minutes.

Try Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training