Rapid7 Vulnerability & Exploit Database

Cacti Import Packages RCE

Back to Search

Cacti Import Packages RCE



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.


  • Egidio Romano
  • Christophe De La Fuente




php, cmd


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/cacti_package_import_rce
msf exploit(cacti_package_import_rce) > show targets
msf exploit(cacti_package_import_rce) > set TARGET < target-id >
msf exploit(cacti_package_import_rce) > show options
    ...show and set options...
msf exploit(cacti_package_import_rce) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security