Skip to content
Info disclosure Write-up Intermediate

CVE-2024–23897 — Jenkins File Read Vulnerability — POC

Jenkins mishandles command arguments in the args4j library, so an @ character followed by a file path causes the file's contents to be exposed. An unauthenticated attacker could read arbitrary files on the Jenkins controller, including keys and configuration, which may lead to further exploitation such as remote code execution.

verylazytech Follow

Published on medium.com

CVE-2024–23897 is a critical vulnerability in Jenkins that allows unauthenticated attackers to read arbitrary files on the Jenkins controller’s file system. This flaw arises from improper handling of command arguments in the args4j library, specifically in command-line operations where an @ character followed by a…

Very Lazy Tech 👾, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the args4j library expands an argument beginning with @ into the contents of the named file, and Jenkins passed user-controlled command arguments into it without blocking that behaviour.

Impact

Attackers could read sensitive files such as cryptographic keys and configuration, which may be leveraged for further exploitation including remote code execution.

What the attacker needed

Network access to the Jenkins controller; no authentication needed

The fix

The vulnerability was fixed in Jenkins 2.442 and later and Jenkins LTS 2.426.3 and later, so users should upgrade.

How it was found

  1. Find Jenkins instances using a search engine dork for the affected version header.
  2. Clone the exploit repository.
  3. Run the exploit script against the target URL.
  4. Enter the file path to read, such as the Linux password file.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Jenkins is a tool that automates building and testing software. A flaw in how it reads command-line arguments meant that typing an @ sign followed by a file path made it show that file's contents instead of treating it as text. Because this could be done without logging in, anyone who could reach the server could read private files on it.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by verylazytech

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.