Summary
CVE-2024-23897 was a critical arbitrary file read vulnerability in the Jenkins automation server, identified by Sonar's Vulnerability Research and disclosed in the Jenkins security advisory on January 24, 2024, affecting Jenkins weekly up to 2.441 and LTS up to 2.426.2. Jenkins parses built-in CLI command arguments with the args4j library, whose expandAtFiles feature is enabled by default and replaces an argument that begins with an @ character followed by a file path with the contents of that file; because Jenkins never disabled this, an attacker could pass @/path/to/file as a CLI argument to make the controller read and disclose files from its filesystem. Unauthenticated attackers could read the first few lines of arbitrary files, while attackers with Overall/Read permission could read entire files, enabling theft of secrets, SSH keys, and credentials. The leaked binary secret keys could then be chained into full remote code execution by forging Remember-me cookies, abusing Resource Root URLs, bypassing CSRF protection, or decrypting stored secrets. The flaw was added to the CISA KEV catalog on August 19, 2024 and was actively exploited, including by the RansomEXX ransomware gang and the actor IntelBroker, and was linked to breaches at BORN Group and Brontoo Technology Solutions.
How to avoid it in your code
- Patch to Jenkins weekly 2.442 or LTS 2.426.3 / 2.440.1 or later immediately.
- Disable CLI access as a temporary workaround if patching is not possible.
- Do not expose the Jenkins controller to the internet; restrict it to trusted networks.
- Rotate all secrets, SSH keys, and credentials that were readable on the controller.
- Apply least privilege to Jenkins accounts and monitor for anomalous CLI activity.
References
- https://www.jenkins.io/security/advisory/2024-01-24/
- https://nvd.nist.gov/vuln/detail/CVE-2024-23897
- https://www.bleepingcomputer.com/news/security/cisa-warns-of-jenkins-rce-bug-exploited-in-ransomware-attacks/
- https://github.com/jenkinsci/jenkins/commit/554f03782057c499c49bbb06575f0d28b5200edb
- https://github.com/jenkinsci/jenkins
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-75859
CodeWhale: Project config `instructions` override enables arbitrary file read into AI system prompt via cloned repository
- MEDIUMGHSA-2223-f22x-24cq
Winter: Local File Inclusion through =include directives in JavaScript asset compilation
- HIGHGHSA-rr55-jp92-8wp2
claude-faf-mcp has an arbitrary local file read/write via unconfined `path` argument in FAF tools
- HIGHGHSA-j4r7-8ph4-43g3
faf-mcp has an arbitrary local file read/write via unconfined `path` argument in FAF tools
- HIGHGHSA-cc2g-gq8c-r332
grok-faf-mcp has an arbitrary local file read via unconfined `path` argument in FAF tools
- HIGHGHSA-3f7w-8rr8-f37f
GitPython: Unguarded git option forwarding in IndexFile.checkout() and TagReference.create() enables arbitrary file overwrite and arbitrary file read