CVE-2024-29895 Cacti command injection in cmd_realtime.php

Critical 10.0 Published Updated

Unauthenticated attackers can execute arbitrary commands on Cacti servers if PHP register_argc_argv is enabled, allowing full system compromise.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-29895?

CVE-2024-29895 is a critical command injection vulnerability in cacti, published on 13 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-77

Which versions are affected by CVE-2024-29895?

How do I fix CVE-2024-29895?

No fix has been published for CVE-2024-29895 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2024-29895 being exploited?

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

Public exploit code: 1 Nuclei template and 3 proofs of concept on GitHub.

Sources

Also known as GHSA-cr28-x256-xf5m, UBUNTU-CVE-2024-29895.

Is CVE-2024-29895 in your software?

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

Check your SBOMs for free