Exploit database

Vulnerability

CVE-2024-25641

Cacti RCE vulnerability when importing packages

Vulnerability details

Score
9.1
Severity
critical

CVSS 3.1 路 GitHub_M

Vector string

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

9 sources
Cacti Import Packages RCE
MSF-multi--http--cacti_package_import_rceMetasploitLinux,PHP,Unix,Windows / remote

This exploit module leverages an arbitrary file write vulnerability (CVE-2024-25641) in Cacti versions prior to 1.2.27 to achieve RCE. It abuses the `Import Packages` feature to upload a specially crafted package that embeds a PHP file. Cacti will extract this file to an accessible location. The module finally triggers the payload to execute arbitrary PHP code in the context of the user running the web server. Authentication is needed and the account must have access to the `Import Packages` feature. This is granted by setting the `Import Templates` permission in the `Template Editor` section.

2024-05-12cacti_package_import_rce.rb
5ma1l/cve-2024-25641
GH-d99d7af3433b25cd10dde96388154440GitHubUnofficial GitHub source

This repository automates the process of exploiting CVE-2024-25641 on Cacti 1.2.26

2024-08-264 files 路 8 stars
d3ext/cve-2025-24893
GH-39a36da2d9e5bdceeaa75f86a39bf3c9GitHubUnofficial GitHub source

POC exploit for CVE-2025-24893

2025-08-094 files 路 4 stars
d3ext/cve-2024-25641
GH-bd92d2f9ee1a8a66ce840a03d253ab1eGitHubUnofficial GitHub source

POC exploit for CVE-2024-25641

2025-01-055 files 路 1 stars
safarchand/cve-2024-25641
GH-e9235783cb1f8da3b0a48c3d6ba2080fGitHubUnofficial GitHub source

PoC for CVE-2024-25641 Authenticated RCE on Cacti v1.2.26

2024-08-273 files 路 1 stars