# CVE-2026-39938: Cacti unauthenticated LFI and command injection in graph_theme

Source: https://junglewise.ai/threats/cve-2026-39938-cacti-unauthenticated-lfi-and-command-injection-in-graph-theme  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-24. Updated: 2026-06-24  
License: CC BY 4.0 with a link back

CVE-2026-39938 · Severity: critical · CVSS 9.8 · Published 2026-06-24

Cacti is an open-source platform used by organizations to monitor network performance and manage IT infrastructure. A critical security flaw allows unauthenticated remote attackers to access sensitive files on the server or potentially execute malicious commands. This could lead to a total system takeover, data theft, or disruption of monitoring services.

## Quick answers

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

**How severe is CVE-2026-39938?** Critical severity, with a CVSS score of 9.8, published 24 June 2026.

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

**Is there a fix for CVE-2026-39938?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

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

**Am I affected by CVE-2026-39938?** Check whether anything you run is named in the advisory. 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 Local File Inclusion (LFI) and OS Command Injection vulnerability exists in Cacti versions 1.2.30 and prior. The flaw is rooted in the 'graph_theme' parameter within 'lib/rrd.php', where user-supplied input is used to construct file paths without sufficient validation. While an initial fix attempted to use 'basename()', it was found to be bypassable, leading to a more robust fix involving 'cacti_validate_theme()' and filesystem-allowlist validation. An unauthenticated attacker can exploit this over the network to include arbitrary files or inject commands via rrdtool IPC serialization, resulting in full system compromise. Users should upgrade to version 1.2.31.

## Affected products

- Cacti Group Cacti <= 1.2.30

## Timeline

- 2026-04-17: other: Vulnerability reviewed in session
- 2026-06-19: advisory: GitHub Security Advisory published
- 2026-06-24: disclosed: CVE published to NVD

## References

- [https://github.com/Cacti/cacti/commit/9871f0cef9af285398d558c9b3188d5977e01a04](https://github.com/Cacti/cacti/commit/9871f0cef9af285398d558c9b3188d5977e01a04)
- [https://github.com/Cacti/cacti/security/advisories/GHSA-rm7p-qcqm-x5m6](https://github.com/Cacti/cacti/security/advisories/GHSA-rm7p-qcqm-x5m6)
