Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-46169: Unauthenticated Remote Command Execution in Cacti

Published Dec 5, 2022 · Updated today
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 2 in a dayToday
CVSS9.8Critical · v3.1
EPSS98.2%100th percentile
CISA KEVYesAdded Feb 16, 2023
In the wildActivePer CISA KEV
Vendor
Cacti
IdentifiersCVE-2022-46169CWE-78 · Improper Neutralization of Special…

CVE-2022-46169 is an unauthenticated command injection vulnerability affecting Cacti versions 1.2.22 and earlier. The remote polling endpoint authorizes clients by resolving their IP address and matching the resulting hostname against the poller database. Because get_client_addr trusts attacker-controlled HTTP headers, an attacker can impersonate an authorized poller, including the Cacti server itself. After bypassing authorization, the attacker can invoke the polldata action. When a matching poller item uses POLLER_ACTION_SCRIPT_PHP, poll_for_data incorporates the insufficiently validated poller_id parameter into a command executed through proc_open, enabling arbitrary operating system command execution.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation compromises the Cacti server within the privileges of the executing application process, potentially allowing access to application data and network monitoring information, modification of monitoring operations, and installation of additional malware. Exposed network information can support further targeting and lateral movement. Exploitation in the wild has delivered Mirai-derived malware, Moobot, and ShellBot, enabling activities including distributed denial-of-service attacks, reverse shells, and port scanning.

Mitigation

If you can’t patch tonight, do this now.

Restrict access to the remote polling endpoint to trusted pollers using network or web-server access controls. Prevent client-supplied forwarding headers from determining the address used for authorization; where compatibility requires these headers, ensure attackers cannot use them to impersonate the Cacti server or another authorized poller. These measures reduce exposure but do not replace upgrading.

Remediation

Patch, then assume compromise.

Upgrade to a supported Cacti release containing the fix. The first patched release in the 1.2.x branch is 1.2.23; the corresponding patched 1.3.x release is 1.3.0. Apply the vendor fixes addressing both client-address-based authorization bypass and command injection.

Public exploits

Exploits

17 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
cacti_unauthenticated_cmd_injection.rbThis repository contains a single Metasploit module targeting an unauthenticated command injection vulnerability in Cacti (CVE-2022-46169), affecting versions up to 1.2.22. The exploit leverages a flaw in the /remote_agent.php endpoint, specifically when handling the poller_id parameter in a GET request with the action=polldata. The module can brute-force required parameters (host_id and local_data_id) if not provided, and uses the X-Forwarded-For header to bypass access controls. Upon successful exploitation, arbitrary commands or payloads (such as reverse shells or Meterpreter sessions) can be executed as the www-data user. The exploit is weaponized, supporting both command and staged payloads, and is integrated into the Metasploit framework. The code is written in Ruby and is structured as a typical Metasploit exploit module, with options for target URI, header manipulation, and brute-forcing of required IDs.Disclosed Dec 5, 2022 · Framework: metasploit · ruby · networkWeaponizedCVE-2022-46169This repository is a small standalone Python exploit for CVE-2022-46169, an unauthenticated command injection vulnerability in Cacti prior to 1.2.22. The repository contains only three files: a standard Apache 2.0 LICENSE, a minimal README identifying the CVE and issue, and the main exploit implementation in main.py. The exploit logic is straightforward: it reads a list of target base URLs from a user-supplied file, accepts a second argument containing the command to execute, and spawns a thread per target. For each host, it sends an HTTP GET request to the Cacti endpoint /remote_agent.php with action=polldata and injects the operator-provided command into the poller_id parameter using a leading semicolon. It also sets the X-Forwarded-For header to 127.0.0.1, reflecting the known exploitation technique for this vulnerability where trusted/local requests are mishandled. The script is operational but basic. It does not implement output retrieval, shell management, authentication handling, retries, or robust error reporting. Instead, it infers success by checking the HTTP response body for strings such as 'local_data_id' and treats 404 responses or 'FATAL: You are not authorized to use this service' as signs the target is not vulnerable. Because the payload is fully operator-controlled, the exploit can execute arbitrary commands, but only as a one-shot command injection primitive. Overall purpose: bulk-check and exploit multiple Cacti targets for unauthenticated command execution via the vulnerable remote_agent.php endpoint.sh4den · Disclosed Jan 2, 2023 · python · markdown · web · networkOperationalCVE-2022-46169This repository contains an exploit for CVE-2022-46169, a critical unauthenticated command injection vulnerability in Cacti (versions prior to 1.2.22). The main exploit logic is implemented in 'main.py', which reads a list of target hosts from a file and attempts to exploit each by sending a crafted HTTP GET request to the '/remote_agent.php' endpoint. The exploit injects an arbitrary command (provided by the user) into the 'poller_id' parameter, leveraging the vulnerability to execute system commands on the target server. The script uses threading to attack multiple hosts in parallel and provides console output indicating whether each host appears vulnerable. The exploit is operational, requiring only a list of targets and a command to execute, and demonstrates real-world impact by achieving remote code execution. No hardcoded IPs or domains are present, but the endpoint '/remote_agent.php' is fingerprintable. The repository is structured simply, with a single Python exploit file, a README, and a license.SystemVll · Disclosed Jan 2, 2023 · python · networkOperationalCVE-2022-46169This repository contains a Python exploit script (cve_2022_46169.py) targeting CVE-2022-46169, an unauthenticated remote code execution vulnerability in Cacti version 1.2.19. The exploit works by bypassing authentication using various X-Forwarded headers, brute-forcing valid host_id and local_data_ids[] parameters, and then performing command injection via the remote_agent.php endpoint. The script can operate in two modes: 'check' (to test for vulnerability) and 'exploit' (to attempt exploitation). The payload is a bash reverse shell, which, if successful, grants the attacker remote shell access to the target. The README.md provides usage instructions and references. The main fingerprintable endpoint is /remote_agent.php on the target Cacti instance. The exploit is operational, requiring some manual configuration (such as setting the attacker's IP and port for the reverse shell).c3rrberu5 · Disclosed Jan 13, 2023 · python · networkOperationalCVE-2022-46169This repository contains a Ruby exploit script (CVE-2022-46169.rb) targeting the Cacti network monitoring tool, specifically versions 1.2.17 through 1.2.22, which are vulnerable to unauthenticated remote code execution (RCE) via CVE-2022-46169. The exploit works by sending crafted HTTP requests to the 'remote_agent.php' endpoint, using a user-supplied 'X-Forwarded' header to bypass authentication. It brute-forces valid 'host_id' and 'local_data_ids[]' parameters, then injects a reverse shell payload that connects back to the attacker's specified IP and port. The payload is delivered in two stages: first, it writes a bash reverse shell command to a file ('rev.sh') on the target, then executes it via command injection. The repository includes a README with usage instructions and references to a vulnerable Docker environment for testing. The exploit is operational, providing a working reverse shell if successful, and is not part of a larger framework.Habib0x0 · Disclosed Jan 15, 2023 · ruby · networkOperationalcacti-cve-2022-46169-exploitThis repository provides a Python proof-of-concept exploit for CVE-2022-46169, targeting Cacti version 1.2.22. The exploit leverages an authentication bypass in the /remote_agent.php endpoint, using a spoofed X-Forwarded-For header to match an entry in the poller table. The script first checks if the target is vulnerable, then brute-forces host_id and local_data_id parameters to find valid values. Once found, it delivers a command injection payload via the 'polldata' action, resulting in remote code execution. The default payload opens a reverse shell to the attacker's machine. The repository consists of a single exploit script (cacti.py) and a README.md with usage instructions and background information. The exploit is operational and requires the attacker to supply their own IP and port for the reverse shell connection.ariyaadinatha · Disclosed Mar 11, 2023 · python · networkOperationalCVE-2022-46169_unauth_remote_code_executionThis repository contains a Python exploit script (exploit.py) targeting CVE-2022-46169, an unauthenticated remote code execution vulnerability in Cacti versions prior to 1.2.23 and 1.3.0. The exploit leverages an authentication bypass (using spoofed HTTP headers such as X-Forwarded-For) and a command injection vulnerability in the 'remote_agent.php' endpoint. The script attempts to enumerate valid host_id and data_id values to trigger the vulnerability, and upon success, injects a base64-encoded bash reverse shell payload via the poller_id parameter. The attacker must provide their own IP and port to receive the shell. The script supports both targeted and aggressive exploitation modes. The repository also includes a README.md describing the exploit and a LICENSE file. The main exploit logic is contained in exploit.py, which is the only code file.JacobEbben · Disclosed Apr 9, 2023 · python · networkOperationalCVE-2022-46169This repository contains a Python exploit script (xplt_fixed.py) targeting Cacti versions 1.2.2x up to 1.2.22, exploiting CVE-2022-46169 for unauthenticated remote command execution (RCE). The exploit works by sending crafted HTTP GET requests to the Cacti server's /remote_agent.php endpoint, injecting a base64-encoded bash reverse shell payload via URL parameters. The attacker must specify the target URL, their own IP and port for the reverse shell, and a value for the X-Forwarded-For header (likely to bypass access controls). The script iterates over possible host_id and local_data_ids values to maximize the chance of successful exploitation. If successful, the attacker receives a reverse shell from the Cacti server. The repository structure is simple, containing only a README and the main exploit script.icebreack · Disclosed Apr 13, 2023 · python · networkOperationalCVE-2022-46169This repository contains a Python exploit script (cacti.py) targeting CVE-2022-46169 in Cacti version 1.2.22. The exploit works by interacting with the 'remote_agent.php' endpoint of a vulnerable Cacti installation. It first checks if the target is vulnerable, then brute-forces host and local data IDs to find exploitable parameters. If successful, it delivers a bash reverse shell payload to the attacker's specified IP and port, granting remote code execution. The script requires the attacker to provide the target URL, their own IP, and a listening port. The repository is simple, with only a README and the exploit script, and is focused solely on exploiting this specific vulnerability in Cacti.ruycr4ft · Disclosed May 1, 2023 · python · networkOperationalCVE-2022-46169-CACTI-1.2.22This repository contains a Python exploit script (CVE-2022-46169.py) and a README for CVE-2022-46169, a remote code execution vulnerability in Cacti 1.2.22. The exploit targets the '/remote_agent.php' endpoint on the victim server, attempting to bypass authorization and brute-force valid 'host_id' and 'local_data_ids' parameters. Upon success, it injects a payload that opens a reverse shell to the attacker's machine using a bash command. The script requires the attacker to specify the target URL, their own IP (LHOST), and a listening port (LPORT). The README provides usage instructions and an example of a successful reverse shell session. The exploit is operational, providing a working reverse shell if the target is vulnerable and properly configured.FredBrave · Disclosed May 1, 2023 · python · networkOperationalCVE-2022-46169-Cacti-v1.2.22-RCEThis repository contains a single Python exploit script (CVE-2022-46169.py) targeting Cacti v1.2.22, specifically exploiting CVE-2022-46169. The exploit works by first brute-forcing valid host_id and local_data_id values using multi-threaded HTTP requests to the /remote_agent.php endpoint. Once valid IDs are found, the script crafts a malicious GET request to /remote_agent.php with a specially crafted poller_id parameter that injects an arbitrary command (provided by the user) for execution on the target system. The exploit leverages the 'X-Forwarded-For: 127.0.0.1' header to bypass access controls. The repository also includes a standard .gitignore and a GPLv3 license file. The README is minimal and only states the CVE and Cacti version. The exploit is operational, providing real command execution on vulnerable targets, and is not part of any larger framework.mind2hex · Disclosed Mar 28, 2024 · python · networkOperationalCVE-2022-46169This repository contains a Python exploit script (CVE-2022-46169.py) targeting Cacti v1.2.22, specifically exploiting an unauthenticated command injection vulnerability (CVE-2022-46169) in the /remote_agent.php endpoint. The script first checks if the target is vulnerable, then brute-forces required host and data IDs, and finally delivers a reverse shell payload to the attacker's specified IP and port using a bash command injection. The exploit is operational and provides remote code execution if successful. The repository also includes a brief README referencing the vulnerability and the original PoC author.lof1sec · Disclosed Jan 4, 2025 · python · networkOperationalSHELL-POC-CVE-2022-46169This repository contains a Bash proof-of-concept exploit for CVE-2022-46169, a remote code execution vulnerability in Cacti. The main script, poc.sh, takes as input the attacker's IP, listening port, and the target Cacti URL. It first checks if the target is vulnerable by probing /cacti/remote_agent.php, then enumerates possible host_id and local_data_ids to find a valid endpoint. Once a suitable endpoint is found, it crafts and URL-encodes a Bash reverse shell payload, which is injected via a crafted HTTP request. If successful, the exploit grants the attacker a reverse shell on the target system. The repository is structured with a README providing usage instructions and a single Bash script implementing the exploit logic. No hardcoded endpoints are present; the target URL is supplied by the user. The exploit is operational and delivers a working payload, but is not part of a larger framework.RdBBB3 · Disclosed May 21, 2025 · bash · networkOperationalCVE-2022-46169-Cacti-1.2.22This repository contains a Python exploit script (CVE-2022-46169.py) targeting the Cacti network monitoring tool, specifically exploiting CVE-2022-46169. The exploit abuses a command injection vulnerability in the /remote_agent.php endpoint. The script can operate in two modes: direct execution (if host_id and local_data_id are known) or brute-force (testing combinations of host_id and local_data_id). Upon successful exploitation, it delivers a bash reverse shell to the attacker's specified LHOST and LPORT. The repository also includes a README.md with usage instructions and a .gitignore file. The exploit is operational, requiring the attacker to set up a listener and provide the target URL and their own IP/port for the reverse shell. The main fingerprintable endpoint is /remote_agent.php on the target server.alv-david · Disclosed Jul 2, 2025 · python · networkOperationalCVE-2022-46169This two-file repository contains a detailed Markdown write-up and a standalone Python 3 exploit for CVE-2022-46169, an unauthenticated command-injection/RCE chain in Cacti 1.2.22. The README describes the chain as an authorization bypass in remote-agent client-IP handling followed by insufficient poller_id validation in remote_agent.php action=polldata, allowing data to reach a proc_open command context. It identifies Cacti 1.2.23 as the fixed release. exploit.py is the operational entry point. It first fingerprints the root page for Cacti 1.2.22 and confirms remote_agent.php availability. It sends Host: cacti.xxx.xx and X-Forwarded-For: 127.0.0.1, brute-forces host_id values 1-5 and local_data_id values 1-19 to find a polldata response, then manually constructs an unencoded query string with `poller_id=1;<command>`. The script intentionally suppresses exceptions and treats command execution as blind unless its webshell mode is used. Default behavior writes id output to a target-side /tmp marker; optional modes execute an arbitrary supplied command, write a PHP webshell to the presumed Cacti webroot, or invoke a Bash reverse shell. The exploit is not tied to a recognized exploitation framework and is operational but environment-specific because of its fixed virtual-host name, narrow ID brute-force range, and Linux/webroot assumptions.K4PXD · Disclosed Aug 28, 2026 · python · markdown · network · webOperationalvulhub-cacti-cve-2022-46169This is a deliberately vulnerable training environment with a valid manual exploit documented in its vendored READMEs, not a standalone automated exploitation tool. CVE-2022-46169 combines spoofable client-address authorization in remote_agent.php with shell injection through poller_id during the polldata action for script-server data sources. The documentation describes affected versions 1.2.17–1.2.22; this repository deploys 1.2.22. Its hardcoded payload creates /tmp/success without returning output. Despite the CTF metadata asking for a shell, no reverse-shell payload, callback address, enumeration routine or automated exploit runner is supplied. The 38 files include 20 code/build files: seven Terraform modules, one Ruby Vagrantfile, eight shell scripts, one PHP configuration and three Dockerfiles. YAML deployment specifications, workflows, JSON metadata and documentation comprise the remainder. isoloom.yml defines an offline two-machine lab: Cacti at 10.61.38.10:80 and MySQL 5.7 at 10.61.38.20:3306. build/ wraps the published Vulhub and MySQL images, while base/ preserves the original Cacti image build recipe. build/web/app/ contains the upstream Compose environment, database initialization script and bilingual exploitation walkthrough. .isoloom/ contains generated Docker, Kubernetes, local VM, Proxmox and six cloud-provider deployment outputs. Isoloom is deployment tooling rather than an exploit framework, so the full repository was analyzed. checks/cacti.sh fingerprints the application and version and verifies that remote_agent.php rejects an ordinary unauthorized request. Generated checks test service reachability and attempted outbound access; none executes the injection payload. Docker routing sidecars remove default routes, and Kubernetes policies restrict egress subject to network-plugin enforcement, which can prevent external reverse-shell connections. CI validates generated artifacts, starts the lab and runs these checks; publishing uses secret-supplied backend URLs. Observed downloads and external probes are infrastructure dependencies or isolation tests, not exfiltration or command-and-control destinations. Cleanup commands in CI and VM provisioning do not indicate a fake exploit. Analysis is static: no deployment or exploit execution was performed. The analyzed repository URL, Git reference and archive size were not supplied; empty strings and zero represent unavailable metadata, and the documented upstream commit was not substituted for the analyzed repository reference.CyberCTF · Disclosed Oct 8, 2026 · sh · bash · web · networkOperationalCVE-2022-46169This repository contains a single Python script (CVE-2022-46169.py) that serves as a proof-of-concept exploit for CVE-2022-46169, an unauthenticated remote code execution vulnerability in Cacti versions up to 1.2.22. The exploit works by sending crafted HTTP GET requests to the /remote_agent.php endpoint of a vulnerable Cacti installation, injecting arbitrary shell commands via the poller_id parameter. The script allows the attacker to specify the target URL, the command to execute (either directly or from a file), and the range of host_id and local_data_id values to try. The X-Forwarded-For header is set to 127.0.0.1 to bypass authentication. The repository also includes a README with usage instructions and a standard GPLv2 license file. The exploit is a functional PoC and does not include advanced payloads or post-exploitation features.sAsPeCt488 · Disclosed Jan 5, 2023 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
CactiCactiapplication
FAQ

Frequently asked questions

Is CVE-2022-46169 exploited in the wild?
Yes. As of Nov 27, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Feb 16, 2023.
Is there a public exploit for CVE-2022-46169?
Yes. Mallory tracks 17 public exploits or proofs of concept for CVE-2022-46169, the earliest disclosed Dec 5, 2022.
Is there a patch for CVE-2022-46169?
Upgrade to a supported Cacti release containing the fix. The first patched release in the 1.2.x branch is 1.2.23; the corresponding patched 1.3.x release is 1.3.0.
What products are affected by CVE-2022-46169?
Cacti.
How severe is CVE-2022-46169?
CVE-2022-46169 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 98.2% (100th percentile) as of Nov 27, 2026.
Activity feed

Recent activity

9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+4 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware6Malware families linked to this CVE, with evidence and IOCs.
Detection signatures4YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.