Loading...
Skip to main content

CVE-2024-23897

CRITICAL
Actively Exploited

Arbitrary file read vulnerability through the Jenkins CLI can lead to RCE

Published January 24, 2024Updated August 7, 2026Source: osv

What Should I Do?

Patch Immediately

This vulnerability is confirmed under active exploitation (CISA KEV). Patch within 24-48 hours if possible.

Summary

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.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update org.jenkins-ci.main:jenkins-core to 2.442 or later
<!-- Update pom.xml dependency version to 2.442 for org.jenkins-ci.main:jenkins-core -->
Maven
Update org.jenkins-ci.main:jenkins-core to 2.426.3 or later
<!-- Update pom.xml dependency version to 2.426.3 for org.jenkins-ci.main:jenkins-core -->
Maven
Update org.jenkins-ci.main:jenkins-core to 2.440.1 or later
<!-- Update pom.xml dependency version to 2.440.1 for org.jenkins-ci.main:jenkins-core -->

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

PackageEcosystemAffectedFixed In
org.jenkins-ci.main:jenkins-core
maven
2.4412.442
org.jenkins-ci.main:jenkins-core
maven
1.606, 1.607, 1.608, 1.609 (+596 more)2.426.3
org.jenkins-ci.main:jenkins-core
maven
2.427, 2.428, 2.429, 2.430 (+10 more)2.440.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H

Frequently Asked Questions

What is CVE-2024-23897?
Arbitrary file read vulnerability through the Jenkins CLI can lead to RCE This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2024-23897?
CVE-2024-23897 affects org.jenkins-ci.main:jenkins-core. This vulnerability is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, meaning it is being actively exploited in the wild. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-23897 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Known Exploited Vulnerability

This vulnerability is in CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild.

Remediation deadline: September 9, 2024

Also Known As

GHSA-6f9g-cxwr-q5jr
BIT-jenkins-2024-23897

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies