# CVE-2026-39902: Cacti input string validation bypass and RCE

Source: https://junglewise.ai/threats/cve-2026-39902-cacti-is-an-open-source-performance-and-fault-management  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-23. Updated: 2026-10-23  
License: CC BY 4.0 with a link back

CVE-2026-39902 · Severity: high · CVSS 7.2 · Published 2026-10-23

Cacti is an open-source monitoring and fault management framework. An authenticated administrator could bypass input validation in the data input feature by injecting shell metacharacters, allowing remote code execution on the monitoring server. An attacker with admin credentials could compromise the entire monitoring infrastructure and any systems it manages.

Technologies: [Cacti](https://junglewise.ai/threats/technologies/cacti). Vendors: [Cacti](https://junglewise.ai/threats/vendors/cacti).

## Quick answers

**Is CVE-2026-39902 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-39902 being exploited in the wild.

**How severe is CVE-2026-39902?** High severity, with a CVSS score of 7.2, published 23 October 2026.

**Which products and versions are affected?** Cacti prior to 1.2.31.

**Is there a fix for CVE-2026-39902?** Yes: fixed in 1.2.31. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-39902 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-39902?** Check whether you run Cacti at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 1.2.31

## Technical details

The cacti_input_string_is_safe() function's blocklist was incomplete, omitting single-quote, double-quote, redirect operators (&lt;, &gt;), subshell parentheses, and braces. An authenticated admin could save a data input string containing these characters to bypass validation and execute arbitrary OS commands via shell injection. The fix extends the blocklist and introduces a new cacti_exec() function using proc_open() with discrete argv arrays to eliminate shell involvement entirely.

## Affected products

- Cacti Cacti prior to 1.2.31

## Timeline

- 2026-07-27: disclosed
- 2026-05-05: patched: PR #7112 merged

## References

- [https://github.com/Cacti/cacti/pull/7112](https://github.com/Cacti/cacti/pull/7112)
- [https://github.com/Cacti/cacti/security/advisories/GHSA-c4qp-j9r9-fq24](https://github.com/Cacti/cacti/security/advisories/GHSA-c4qp-j9r9-fq24)

## Related threats

- [Cacti user enumeration via error messages](https://junglewise.ai/threats/cve-2026-49442-cacti-is-an-open-source-performance-and-fault-management)
- [Cacti authenticated stored SQL injection in automation tree rule](https://junglewise.ai/threats/cve-2026-46531-cacti-is-an-open-source-performance-and-fault-management)
- [Cacti package import signature validation bypass](https://junglewise.ai/threats/cve-2026-40941-cacti-package-import-signature-validation-bypass)
- [Cacti path traversal in Report format_file parameter](https://junglewise.ai/threats/cve-2026-40084-cacti-path-traversal-in-report-format-file-parameter)
- [Cacti SQL injection in managers.php](https://junglewise.ai/threats/cve-2026-40083-cacti-sql-injection-in-managers-php)
