CVE-2024-23897 Jenkins Command Line Interface (CLI) Path Traversal

Exploited in the wild Critical 9.8 Published Updated

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.

Weakness: CWE-22, CWE-27

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.

PackageAffectedFixed in
org.jenkins-ci.main:jenkins-core MavenFrom 1.6062.426.3
org.jenkins-ci.main:jenkins-core MavenFrom 1.6062.426.3
org.jenkins-ci.main:jenkins-core MavenFrom 2.4272.440.1
org.jenkins-ci.main:jenkins-core MavenFrom 2.4272.440.1
org.jenkins-ci.main:jenkins-core MavenFrom 2.4412.442
org.jenkins-ci.main:jenkins-core MavenFrom 2.4412.442
1 more packages
jenkins BitnamiAll versions2.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.

All Jenkins Jenkins vulnerabilities

Sources

Also known as BIT-jenkins-2024-23897, GHSA-6f9g-cxwr-q5jr.

Is CVE-2024-23897 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free