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

[R2] Jenkins Forced Migration of User Records

Medium

Synopsis

Tenable discovered a vulnerability in Jenkins which allows valid user folders to be migrated. This can be exploited by a remote unauthenticated attacker.

Attempting to authenticate as a valid user (e.g. admin), preceded by a relative path that leads to the same user account folder on the file system (admin, /admin, ./admin, ../users/admin, etc) will force Jenkins to migrate that user's folder to the sanitized version of the relative path used.

This effectively creates a clone of the original user's config file and user account under a new user id, and deletes the user's original folder. The original user's account will persist until the Jenkins service restarts, after which point the original user will no longer be able to login under their original username. This method is a particularly dangerous when combined with the unauthenticated user enumeration possible in 2.121.2 LTS, as the process of migrating all users could be automated.

As a proof of concept, consider the following URL:

http://[ip]:[port]/securityRealm/user/..%2fusers%2fadmin

When visited, the following can be observed in the Jenkins log:

INFO hudson.model.User getOrCreate
Migrated user record from C:\Program Files (x86)\Jenkins\users\..\users\admin\config.xml to C:\Program Files (x86)\Jenkins\users\..$002fusers$002fadmin\config.xml

Solution

  • Jenkins weekly should be updated to version 2.154
  • Jenkins LTS should be updated to version either 2.138.4 or 2.150.1

Disclosure Timeline

08/21/2018 - Vulnerability discovered.
08/21/2018 - Vulnerability posted to Jenkins issue tracker. 90-day date set as 11/19/2018.
08/21/2018 - Vendor says issue is a duplicate. Previously reported as SECURITY-1072.
10/18/2018 - Jenkins asks for the 2 week extension in Tenable's policy.
10/19/2018 - Tenable agrees to delay disclosure if necessary.
10/24/2018 - Jenkins postpones release date to Dec. 5th.
11/28/2018 - Jenkins confirms Dec. 5th release date. Asks Tenable to coordinate on that date.
11/29/2018 - Tenable acknowledges and accepts this request.
12/09/2018 - A CVE is assigned.

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]

Try for Free Buy Now

Try Tenable.io

FREE FOR 60 DAYS

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. Sign up now.

Buy 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. Purchase your annual subscription today.

65 assets

$2,275.00

Buy Now

Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

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 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

Try for Free Buy Now

Try Tenable.io Web Application Scanning

FREE FOR 60 DAYS

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.

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.00

Buy Now

Try for Free Contact Sales

Try Tenable.io Container Security

FREE FOR 60 DAYS

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.

Learn More about Industrial Security

Get a Demo of Tenable.sc

Please fill out the form below with your contact information and a sales representative will contact you shortly to schedule a demo. You may also include a short comment (limited to 255 characters). Please note that fields with asterisks (*) are mandatory.