CVE-2024-23897 Jenkins Command Line Interface (CLI) Path Traversal
Unauthenticated attackers can read arbitrary files on the Jenkins controller by exploiting CLI argument parsing, exposing sensitive system data.
- Exploited in the wild
- Since 19 Aug 2024
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-23897?
CVE-2024-23897 is a critical path traversal vulnerability in Jenkins Jenkins, published on 24 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.
Which versions are affected by CVE-2024-23897?
7 open source packages ship an affected version, including org.jenkins-ci.main:jenkins-core and jenkins. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.jenkins-ci.main:jenkins-core Maven | From 1.606 | 2.426.3 |
org.jenkins-ci.main:jenkins-core Maven | From 1.606 | 2.426.3 |
org.jenkins-ci.main:jenkins-core Maven | From 2.427 | 2.440.1 |
org.jenkins-ci.main:jenkins-core Maven | From 2.427 | 2.440.1 |
org.jenkins-ci.main:jenkins-core Maven | From 2.441 | 2.442 |
org.jenkins-ci.main:jenkins-core Maven | From 2.441 | 2.442 |
1 more packages
jenkins Bitnami | All versions | 2.452.1 |
Products include Jenkins Jenkins.
How do I fix CVE-2024-23897?
Upgrade org.jenkins-ci.main:jenkins-core to a fixed version for your release line: 2.426.3, 2.440.1 or 2.442. US federal agencies must fix it by 9 Sep 2024.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-23897 being exploited?
Yes. Attackers have exploited CVE-2024-23897 in the wild since at least 19 Aug 2024, including in ransomware campaigns.
Public exploit code: 1 Metasploit module, 1 Exploit-DB entry, 1 Nuclei template and 50 proofs of concept on GitHub.
Other vulnerabilities in Jenkins Jenkins
- CVE-2018-1000861 Jenkins Stapler Web Framework Deserialization of Untrusted Data
- CVE-2017-1000353 Jenkins Remote Code Execution
- CVE-2015-5317 Jenkins User Interface (UI) Information Disclosure
- CVE-2021-21690 Multiple vulnerabilities allow bypassing path filtering of agent-to-controller access control in Jenkins
- CVE-2021-21691 Multiple vulnerabilities allow bypassing path filtering of agent-to-controller access control in Jenkins
Sources
Also known as BIT-jenkins-2024-23897, GHSA-6f9g-cxwr-q5jr.