CVE-2024-23897 is a critical-severity (CVSS 9.8) Path Traversal vulnerability in org.jenkins-ci.main:jenkins-core. It is in CISA's Known Exploited Vulnerabilities catalog (added 2024-08-19) and has been used in ransomware campaigns — treat it as actively exploited and patch now. A fix is available for org.jenkins-ci.main:jenkins-core — see the affected versions and patch details below.
Arbitrary file read vulnerability through the Jenkins CLI can lead to RCE
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2024-08-19 — including use in ransomware campaigns. Federal agencies were required to remediate by 2024-09-09.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2024-23897.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2024-23897 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.jenkins-ci.main:jenkins-core☕org.jenkins-ci.main:jenkins-core☕org.jenkins-ci.main:jenkins-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Jenkins has a built-in command line interface (CLI) to access Jenkins from a script or shell environment.
Jenkins uses the args4j library to parse command arguments and options on the Jenkins controller when processing CLI commands. This command parser has a feature that replaces an @ character followed by a file path in an argument with the file’s contents (expandAtFiles). This feature is enabled by default and Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable it.
This allows attackers to read arbitrary files on the Jenkins controller file system using the default character encoding of the Jenkins controller process.
-
Attackers with Overall/Read permission can read entire files.
-
Attackers without Overall/Read permission can read the first few lines of files. The number of lines that can be read depends on available CLI commands. As of publication of this advisory, the Jenkins security team has found ways to read the first three lines of files in recent releases of Jenkins without having any plugins installed, and has not identified any plugins that would increase this line count.
Binary files containing cryptographic keys used for various Jenkins features can also be read, with some limitations (see note on binary files below). As of publication, the Jenkins security team has confirmed the following possible attacks in addition to reading contents of all files with a known file path. All of them leverage attackers' ability to obtain cryptographic keys from binary files, and are therefore only applicable to instances where that is feasible.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.jenkins-ci.main:jenkins-core | ≥ 1.606&&< 2.426.3 | 2.426.3org.jenkins-ci.main:jenkins-core:2.426.3 |
| ☕Maven | org.jenkins-ci.main:jenkins-core | ≥ 2.427&&< 2.440.1 | 2.440.1org.jenkins-ci.main:jenkins-core:2.440.1 |
| ☕Maven | org.jenkins-ci.main:jenkins-core | ≥ 2.441&&< 2.442 | 2.442org.jenkins-ci.main:jenkins-core:2.442 |
Affected Products
jenkinsjenkinsResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Jenkins 2.441 - Local File Inclusion
by Matisse Beckandt · Apr 15, 2024
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.jenkins-ci.main:jenkins-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.jenkins-ci.main:jenkins-core to 2.426.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-23897 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Disabling access to the CLI is expected to prevent exploitation completely. Doing so is strongly recommended to administrators unable to immediately update to Jenkins 2.442, LTS 2.426.3 or LTS 2.440.1. Applying this workaround does not require a Jenkins restart.Source: Red Hat security advisory for CVE-2024-23897 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| OCP-Tools-4.12-RHEL-8 | jenkins-0:2.426.3.1706515686-3.el8 | RHSA-2024:0778 |
| OCP-Tools-4.13-RHEL-8 | jenkins-0:2.426.3.1706516254-3.el8 | RHSA-2024:0776 |
| OpenShift Developer Tools and Services for OCP 4.11 | jenkins-0:2.426.3.1706516929-3.el8 | RHSA-2024:0775 |
Frequently Asked Questions
Is CVE-2024-23897 in your dependencies?
Find it across Maven, including transitive dependencies.