CVE-2026-40079 Cacti: Command Injection via escape_command() no-op in RRDtool execution
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.
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.
Other vulnerabilities in Cacti Cacti
- CVE-2022-46169 Cacti Command Injection
- CVE-2026-39893 Cacti: Pre-authentication SQL injection via rfilter RLIKE clause in graph_view.php
- CVE-2026-39938 Cacti: Unauthenticated RCE on Graph Image
- CVE-2026-39955 Cacti has Pre-Authentication SQL Injection via unanchored FILTER_VALIDATE_REGEXP in graph_view.php
- CVE-2023-39361 Unauthenticated SQL Injection in graph_view.php in Cacti
Sources
Also known as DEBIAN-CVE-2026-40079, GHSA-xq98-376r-hv9j, UBUNTU-CVE-2026-40079.