← Vulnerability feed

Vulnerability record · CVE-2024-25641 · published 14 May 2024

CVE-2024-25641: Cacti Package Import arbitrary file write leading to PHP code execution

Cacti · Cacti

Cacti before 1.2.27 trusts filenames and content in XML data handled by the import_package() function in /lib/import.php, allowing arbitrary file writes into the Cacti base path or outside it via path traversal. An authenticated user with the Import Templates permission can write or overwrite files and execute arbitrary PHP code on the web server. The flaw is fixed in version 1.2.27.

7.2 CVSS 3.1 High EPSS 86% · top 0.3% CWE-20 · Improper input validation
7.2CVSS 3.1 base score
86%EPSS exploitation probability, 30 days
NoNot in CISA KEV
2Affected product versions listed by NVD
9References, 2 tagged exploit
17 Jun 2026Last modified by NVD

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.

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

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

high priorityThe flaw yields code execution on a monitoring server, has a very high EPSS score and public exploit references, though it requires an authenticated privileged account.

What it is

Cacti before 1.2.27 trusts filenames and content in XML data handled by the import_package() function in /lib/import.php, allowing arbitrary file writes into the Cacti base path or outside it via path traversal. An authenticated user with the Import Templates permission can write or overwrite files and execute arbitrary PHP code on the web server. The flaw is fixed in version 1.2.27.

Impact

An attacker with the Import Templates permission gains arbitrary file write on the web server, which can be turned into remote code execution as the web server user and potentially full compromise of the Cacti host.

Attack surface

Reached over the network through the Package Import feature of the Cacti web interface; it requires an authenticated account holding the Import Templates permission and no user interaction beyond submitting the import.

Exploitation

Not listed in CISA KEV, but EPSS is very high (0.863, 99.7th percentile) and the vendor advisory is tagged Exploit, indicating public exploit material exists. No ransomware usage is documented.

What to do

  • Upgrade Cacti to 1.2.27 or later, and apply the corresponding Fedora/Debian package updates where Cacti is packaged.
  • Restrict the Import Templates permission to the smallest possible set of trusted administrators.
  • Run the Cacti web service with a low-privilege account and confine its filesystem write access to required directories.
  • Monitor and alert on unexpected file creation or modification under the Cacti base path, especially PHP files.
  • Where feasible, block or tightly control access to the package import functionality from untrusted networks.

Detection

  • Audit Cacti user accounts and permission assignments for unexpected holders of the Import Templates permission.
  • Monitor the Cacti base path and web root for newly created or modified PHP files and for path traversal sequences in import activity.
  • Review web server and Cacti logs for package import requests followed by execution of newly written files.
  • Alert on outbound or process activity from the web server user consistent with webshell execution.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2024-25641 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed9.8CVE-2022-46169Cacti remote_agent.php auth bypass leads to OS command injectionCacti's remote_agent.php trusts attacker-controlled HTTP headers when resolving the client IP, letting an unauthenticated attacker spoof the poller h…KEVEPSS 100%analysed9.8CVE-2021-44026Roundcube Webmail SQL injection via search parametersRoundcube Webmail before 1.3.17 and 1.4.x before 1.4.12 is prone to SQL injection through the search or search_params input. The flaw is remotely rea…KEVEPSS 70%analysed9.8CVE-2021-42013Apache HTTP Server path traversal and RCE via incomplete fixThe fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside…KEVEPSS 100%analysed9.8CVE-2021-41773Apache HTTP Server 2.4.49 path traversal and RCEA path normalization flaw introduced in Apache HTTP Server 2.4.49 lets attackers map URLs to files outside directories configured by Alias-like direc…KEVEPSS 100%analysed9.8CVE-2021-1870Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions, affecting macOS Big Sur, Catalina, Mojave, iOS and iPadOS, plus WebKitGTK a…KEVEPSS 7.7%analysed9.8CVE-2021-1871Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions. It affects macOS Big Sur, Catalina, Mojave, iOS and iPadOS, and a remote at…KEVEPSS 7.0%analysed

Source: NIST National Vulnerability Database (record CVE-2024-25641), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.