
Authenticated RCE PoC for Cacti (CVE‑2025‑24367). Uses graph template injection to write and execute a payload via the “Unix – Logged in Users” template. Intended for labs and controlled testing only.
This repository contains a proof‑of‑concept exploit for CVE‑2025‑24367, an authenticated remote code execution vulnerability in Cacti.
The issue abuses insufficient input sanitization in graph template handling. By injecting malicious content into the “Unix – Logged in Users” graph template (ID 226), it is possible to write an arbitrary PHP file to the Cacti web root and execute commands on the server.
This PoC is intended for lab environments, controlled testing, and research purposes only.
The vulnerability exists due to unsafe handling of user‑controlled input in graph template fields, which are passed to RRDTool without adequate sanitization.
The exploit works in two stages:
Payload upload A malicious graph template update causes Cacti to write a PHP file to disk, which downloads a bash reverse shell script from the attacker.
Payload execution The template is triggered again to execute the downloaded script, resulting in a reverse shell back to the attacker.
A temporary HTTP server is used to host the payload during exploitation.
nc -lvnp 4444)Python dependencies:
pip install requests
nc -lvnp 4444
python3 exploit.py
Provide the requested information:
/cacti/)If successful, a reverse shell should connect back to your listener.
This project is provided for educational and research purposes only. The author does not take responsibility for misuse. Only test systems you own or have explicit permission to assess.