The maintainers of Jenkins, a prominent open-source CI/CD automation software, have tackled nine security flaws, with special attention given to a critical vulnerability marked as CVE-2024-23897. This flaw, characterized as an arbitrary file read vulnerability in the built-in command line interface (CLI), could result in remote code execution (RCE) if exploited. The vulnerability lies in the args4j library used by Jenkins to parse command arguments, with a feature that, when not disabled, can replace an @ character followed by a file path with the file’s contents.
The security advisory emphasizes the potential exploitation of this vulnerability by threat actors to read arbitrary files on the Jenkins controller file system. Even though users with “Overall/Read” permission can access entire files, those without it are limited to the first three lines of the files based on the executed CLI commands. Beyond file reading, the flaw poses risks of weaponization to access binary files containing cryptographic keys, paving the way for various attacks, including RCE via Resource Root URLs, “Remember me” cookie, stored XSS attacks through build logs, CSRF protection bypass, decryption of secrets, item deletion in Jenkins, and Java heap dump download.
SonarSource security researcher Yaniv Nizry discovered and reported the flaw on November 13, 2023, leading to its fix in Jenkins 2.442 and LTS 2.426.3. A short-term workaround is recommended until users can apply the patch by turning off access to the CLI. The article underscores the urgency of this patching due to the availability of proof-of-concept (PoC) exploits on GitHub after the public disclosure of the vulnerability.