CVE-2024-29895
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
Cacti provides an operational monitoring and fault management framework. A command injection vulnerability on the 1.3.x DEV branch allows any unauthenticated user to execute arbitrary command on the server when `register_argc_argv` option of PHP is `On`. In `cmd_realtime.php` line 119, the `$poller_id` used as part of the command execution is sourced from `$_SERVER['argv']`, which can be controlled by URL when `register_argc_argv` option of PHP is `On`. And this option is `On` by default in many environments such as the main PHP Docker image for PHP. Commit 53e8014d1f082034e0646edc6286cde3800c683d contains a patch for the issue, but this commit was reverted in commit 99633903cad0de5ace636249de16f77e57a3c8fc.
Scores
- CVSS: 10.0 (critical)
- EPSS: 98.83% chance of exploitation in the next 30 days
- CISA KEV: Not listed
- Published: 2024-05-14
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Upgrade Cacti to 1.2.27 or later (cmd_realtime.php command injection, CVE-2024-29895)
Patch or upgrade. The Cacti 1.3.x development branch passes the poller_id argument of cmd_realtime.php to a shell, which an unauthenticated attacker can abuse when register_argc_argv is on. Upgrading and turning register_argc_argv off fixes it.
Applies to: Cacti 1.3.x development branch before the fix commit
- Check whether the Cacti install comes from the 1.3.x development branch.
- Move to the fixed release named in the vendor advisory, or to the stable 1.2.27 or later.
- Set register_argc_argv = Off in php.ini and restart the web server.
- Block cmd_realtime.php at the web server when it is not used.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.