# CVE-2026-39951: Cacti stored SQL injection in Reports feature

Source: https://junglewise.ai/threats/cve-2026-39951-cacti-stored-sql-injection-in-reports-feature  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-25. Updated: 2026-06-25  
License: CC BY 4.0 with a link back

CVE-2026-39951 · Severity: high · CVSS 7.6 · Published 2026-06-25

Cacti, an open-source network monitoring and fault management framework, contains a security vulnerability in its reporting feature. An attacker with low-level user privileges can inject malicious database commands, potentially allowing them to access sensitive information or disrupt operations. This could lead to unauthorized data exposure or a loss of system integrity within the monitoring environment.

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

## Quick answers

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

**How severe is CVE-2026-39951?** High severity, with a CVSS score of 7.6, published 25 June 2026.

**Which products and versions are affected?** Cacti <= 1.2.30.

**Is there a fix for CVE-2026-39951?** A patch was published on 2026-04-12: Fix addressed in commit 4c09efaebf3a9faec66969d0b5c4aceaf397f37f Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-39951 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-39951?** 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.

## Technical details

A stored SQL injection vulnerability exists in Cacti versions 1.2.30 and prior within the Reports feature. The vulnerability is rooted in the 'graph_name_regexp' parameter, which fails to properly neutralize special elements before they are used in SQL commands. An authenticated attacker with low privileges can exploit this over the network to execute arbitrary SQL queries against the underlying database. This can result in unauthorized data retrieval (High confidentiality impact) and minor modifications or service disruptions. The fix, introduced in version 1.2.31, involves auditing SQL sinks to use 'db_qstr_rlike()' and ensuring HTML output is properly escaped.

## Affected products

- Cacti Cacti <= 1.2.30

## Timeline

- 2026-04-12: patched: Fix addressed in commit 4c09efaebf3a9faec66969d0b5c4aceaf397f37f
- 2026-06-18: advisory: GitHub Security Advisory published
- 2026-06-25: disclosed: NVD publication date

## References

- [https://github.com/Cacti/cacti/commit/4c09efaebf3a9faec66969d0b5c4aceaf397f37f](https://github.com/Cacti/cacti/commit/4c09efaebf3a9faec66969d0b5c4aceaf397f37f)
- [https://github.com/Cacti/cacti/security/advisories/GHSA-pf37-v86f-5xwp](https://github.com/Cacti/cacti/security/advisories/GHSA-pf37-v86f-5xwp)

## 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 input string validation bypass and RCE](https://junglewise.ai/threats/cve-2026-39902-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)
