CVE-2024-25641 Cacti RCE vulnerability when importing packages

Critical 9.1 Published Updated

Authenticated users with import permissions can exploit path traversal in package imports to write arbitrary files, leading to remote code execution.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-25641?

CVE-2024-25641 is a critical path traversal vulnerability in Cacti Cacti, published on 13 May 2024. An attacker needs administrator access to exploit it, with no action from the victim.

Official 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.

Weakness: CWE-20

Which versions are affected by CVE-2024-25641?

It affects 2 products.

Products include Cacti Cacti, Fedoraproject Fedora.

How do I fix CVE-2024-25641?

Upgrade to a fixed version.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-25641 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-25641 exists.

Public exploit code: 1 Metasploit module, 1 Exploit-DB entry and 7 proofs of concept on GitHub.

All Cacti Cacti vulnerabilities

Sources

Also known as CLEANSTART-2024-UW33831, DEBIAN-CVE-2024-25641, GHSA-7cmj-g5qc-pj88, UBUNTU-CVE-2024-25641.

Is CVE-2024-25641 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free