Jenkins - CVE-2024-23897
Data Leak Vulnerability (fixed in version 2.442, and LTS 2.426.3)
Using Jenkins-CLI it's possible to leak data from the affected host.
When invoking a CLI command with arguments, we have noticed that Jenkins uses args4j’s parseArgument, which calls expandAtFiles:
The function checks if the argument starts with the @ character, and if so, it reads the file in the path after the @ and expands a new argument for each line.
This means that if an attacker can control an argument, they can expand it to an arbitrary number of ones from an arbitrary file on the Jenkins instance.
POC
Download the Jenkins CLI tool:
Authenticated, retrieve complete file:
Unauthenticated or missing Global/Read permissions, read ..
.. first line:
.. second line:
.. third line:
Last updated