CVE-2026-40079 Cacti: Command Injection via escape_command() no-op in RRDtool execution

High 8.6 Published Updated

Attackers can execute arbitrary commands on the server via unsanitized input in Cacti's RRDtool execution path.

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

What is CVE-2026-40079?

CVE-2026-40079 is a high-severity command injection vulnerability in Cacti Cacti, published on 24 Jun 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior are vulnerable to Command Injection due to lack of sanitization in the escape_command() function. The escape_command() function at lib/rrd.php is a no-op: it returns $command unchanged. The command line built by rrdtool_function_graph() is passed through this function and then to shell_exec($full_commandline). The risk is in __rrd_execute() where text_format values from graph templates (which may contain host variable substitutions) reach shell_exec without adequate escaping. This issue has been addressed in version 1.2.31.

Weakness: CWE-88, CWE-78

Which versions are affected by CVE-2026-40079?

It affects 1 product.

Products include Cacti Cacti.

How do I fix CVE-2026-40079?

Upgrade to a fixed version.

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

Is CVE-2026-40079 being exploited?

There is no known exploitation of CVE-2026-40079 in the wild and no public exploit code.

All Cacti Cacti vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-40079, GHSA-xq98-376r-hv9j, UBUNTU-CVE-2026-40079.

Is CVE-2026-40079 in your software?

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

Check your SBOMs for free