Cacti Authenticated OS Command Injection via Host Notes Variable (CVE-2026-39949)
by lukehebe · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-39949
- Category
- web
- Affected product
- Cacti network monitoring platform
- Affected versions
- Cacti <= 1.2.30
- Disclosed
- 2026-07-05
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | lukehebe |
| CVE / Advisory | CVE-2026-39949 |
| Category | web |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | cacti, command-injection, cwe-78, rrdtool, authenticated, rce, oob, network-monitoring |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Cacti network monitoring platform |
| Versions Affected | Cacti <= 1.2.30 |
| Language / Platform | Python 3 PoC against a Cacti web application over HTTP |
| Authentication Required | Yes (user with device/graph template creation privileges) |
| Network Access Required | Yes |
Summary
Cacti substitutes user-controlled host metadata — specifically the device “notes” field — into RRDtool command-line arguments through its variable replacement engine without sanitizing shell metacharacters. An authenticated attacker who can create devices and graph templates can plant shell metacharacters in the notes field, reference the |host_notes| variable from a crafted graph template, and trigger graph rendering to run arbitrary OS commands as the web server user. The included PoC logs into Cacti, creates the malicious device/graph template chain, and triggers rendering to execute a supplied command, with support for both direct output and out-of-band (OOB) confirmation via a callback domain.
Vulnerability Details
Root Cause
Improper neutralization of special elements in an OS command (CWE-78): the |host_notes| variable substitution feeds unsanitized, attacker-controlled text directly into RRDtool command construction.
Attack Vector
- Attacker authenticates to Cacti with an account permitted to create devices and graph templates.
- Attacker sets the device “notes” field to a value containing shell metacharacters and an embedded command.
- Attacker creates or edits a graph template that references the
|host_notes|variable. - Attacker triggers graph generation/rendering for the device, causing Cacti to build an RRDtool command line that includes the unsanitized notes value.
- The injected command executes as the web server user; results are observed directly or via an out-of-band callback (e.g., an Interactsh/oastify domain).
Impact
Full remote code execution as the Cacti web server user by any authenticated user with modest device/template creation privileges, potentially leading to complete compromise of the monitoring host and any credentials/data it holds.
Environment / Lab Setup
Target: Cacti <= 1.2.30 web application with authenticated account
Attacker: Python 3, requests library, optional OOB callback domain (e.g., oastify.com)
Proof of Concept
PoC Script
See
cacti_rce_poc.pyin this folder.
| |
The script authenticates to the target Cacti instance, creates a device with a malicious notes field, wires up a graph template referencing |host_notes|, and triggers rendering so the injected command executes on the server; it can either display command output directly or rely on an OOB callback to confirm execution.
Detection & Indicators of Compromise
Signs of compromise:
- Device “notes” fields containing semicolons, backticks, or
$()sequences - RRDtool invocations with unexpected shell metacharacters in their arguments (visible in process listings or audit logs)
- Outbound DNS/HTTP requests from the Cacti host to unfamiliar OOB callback domains
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to a patched Cacti release once available; monitor the vendor advisory for CVE-2026-39949 |
| Interim mitigation | Restrict device/graph-template creation privileges to trusted administrators only, and audit/sanitize notes fields; consider running RRDtool invocations through a strict allow-list wrapper |
References
Notes
Mirrored from https://github.com/lukehebe/CVE-2026-39949 on 2026-07-05.
| |