Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-23897 PoC — Jenkins 安全漏洞

Source
Associated Vulnerability
Title:Jenkins 安全漏洞 (CVE-2024-23897)
Description:Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.
Description
Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.
Readme
Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration, and continuous delivery.

**CVE-2024-23897(Arbitrary File Read Vulnerability)**
Jenkins 2.441 and earlier, LTS 2.426.2 and earlier does not disable a feature of its CLI command parser that replaces an '@' character followed by a file path in an argument with the file's contents, allowing unauthenticated attackers to read arbitrary files on the Jenkins controller file system.

**Affected versions:** Jenkins 2.441 and earlier, LTS 2.426.2 and earlier

This exploit scans whether the provided target is vulnerable to CVE-2024-23897 and reads the file supplied, from the remote vulnerable server.

**Usage:** python3 CVE-2024-23897.py -u http://localhost:8888/ -f /etc/passwd

For this exploit to work, atleast one of the following conditions have to be met:
1. Legacy mode authorization is enabled.
2. Configuration “Allow anonymous read access” is checked in the “logged-in users can do anything” authorization mode.
3. The signup feature is enabled.

**Note:** If the exploit takes too long to complete/reads only the first few bytes of the file, terminate the exploit and run it again. Also this exploit only works if the vulnerable Jenkins instace is configured with default settings

You can also manually do the exploit with jenkins-cli.jar. To know more, refer the link below
https://github.com/vulhub/vulhub/tree/master/jenkins/CVE-2024-23897

**References:**
https://www.sonarsource.com/blog/excessive-expansion-uncovering-critical-security-vulnerabilities-in-jenkins/

https://github.com/vulhub/vulhub/tree/master/jenkins/CVE-2024-23897

https://www.splunk.com/en_us/blog/security/security-insights-jenkins-cve-2024-23897-rce.html

**Disclaimer: This exploit is to be used only for educational and authorized testing purposes. Illegal/unauthorized use of this exploit is prohibited.**
File Snapshot

[4.0K] /data/pocs/8c17d4b028cffec6548de1822b081a413fb915dd ├── [2.3K] CVE-2024-23897.py └── [1.9K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →