Vigilbase CVEConnect your agent

Cacti Command Injection Vulnerability

Exploited · KEV 2023-02-16Metasploit moduleCVE-2022-46169CWE-74

Exploited since 2023-02-16. 1 of 8 rule sources name it. Our CRS test: blocked.

Edge rules
1/8
Our test
Blocked
CVSS
9.8
EPSS
99.8% Top 0.1%
Posts, 14d
02026-10-20: 0 posts2026-10-21: 0 posts2026-10-22: 0 posts2026-10-23: 0 posts2026-10-24: 0 posts2026-10-25: 0 posts2026-10-26: 0 posts2026-10-27: 0 posts2026-10-28: 0 posts2026-10-29: 0 posts2026-10-30: 0 posts2026-10-31: 0 posts2026-11-01: 0 posts2026-11-02: 0 posts
Published
2022-12-05
Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected versions a command injection vulnerability allows an unauthenticated user to execute… More

Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected versions a command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti, if a specific data source was selected for any monitored device. The vulnerability resides in the `remote_agent.php` file. This file can be accessed without authentication. This function retrieves the IP address of the client via `get_client_addr` and resolves this IP address to the corresponding hostname via `gethostbyaddr`. After this, it is verified that an entry within the `poller` table exists, where the hostname corresponds to the resolved hostname. If such an entry was found, the function returns `true` and the client is authorized. This authorization can be bypassed due to the implementation of the `get_client_addr` function. The function is defined in the file `lib/functions.php` and checks serval `$_SERVER` variables to determine the IP address of the client. The variables beginning with `HTTP_` can be arbitrarily set by an attacker. Since there is a default entry in the `poller` table with the hostname of the server running Cacti, an attacker can bypass the authentication e.g. by providing the header `Forwarded-For: <TARGETIP>`. This way the function `get_client_addr` returns the IP address of the server running Cacti. The following call to `gethostbyaddr` will resolve this IP address to the hostname of the server, which will pass the `poller` hostname check because of the default entry. After the authorization of the `remote_agent.php` file is bypassed, an attacker can trigger different actions. One of these actions is called `polldata`. The called function `poll_for_data` retrieves a few request parameters and loads the corresponding `poller_item` entries from the database. If the `action` of a `poller_item` equals `POLLER_ACTION_SCRIPT_PHP`, the function `proc_open` is used to execute a PHP script. The attacker-controlled parameter `$poller_id` is retrieved via the function `get_nfilter_request_var`, which allows arbitrary strings. This variable is later inserted into the string passed to `proc_open`, which leads to a command injection vulnerability. By e.g. providing the `poller_id=;id` the `id` command is executed. In order to reach the vulnerable call, the attacker must provide a `host_id` and `local_data_id`, where the `action` of the corresponding `poller_item` is set to `POLLER_ACTION_SCRIPT_PHP`. Both of these ids (`host_id` and `local_data_id`) can easily be bruteforced. The only requirement is that a `poller_item` with an `POLLER_ACTION_SCRIPT_PHP` action exists. This is very likely on a productive instance because this action is added by some predefined templates like `Device - Uptime` or `Device - Polling Time`. This command injection vulnerability allows an unauthenticated user to execute arbitrary commands if a `poller_item` with the `action` type `POLLER_ACTION_SCRIPT_PHP` (`2`) is configured. The authorization bypass should be prevented by not allowing an attacker to make `get_client_addr` (file `lib/functions.php`) return an arbitrary IP address. This could be done by not honoring the `HTTP_...` `$_SERVER` variables. If these should be kept for compatibility reasons it should at least be prevented to fake the IP address of the server running Cacti. This vulnerability has been addressed in both the 1.2.x and 1.3.x release branches with `1.2.23` being the first release containing the patch.

Ask Vigil

AI · answers from this page
Ask about CVE-2022-46169: who's covered, what to patch first, how vendors compare. I cite sources and won't help with attacks.

Workers AI (Llama 3.3). Can be wrong: check the cited source.

Severity, decoded

CVSS 3.1
Critical · 9.8 / 10

Exploitable over the network, with no privileges and no user interaction, leading to full loss of confidentiality, integrity and availability.

Over the internetNo login neededNo user actionWorks reliablyFull compromise
How the score is built8 metrics
  • Attack vectorAn attacker can reach it over the internet; no access to your network needed.
    Network
  • Attack complexityNo special conditions are needed; the attack works reliably.
    Low
  • Privileges requiredNo account or login is needed.
    None
  • User interactionNo one has to click or open anything; the attack works on its own.
    None
  • ScopeThe damage stays within the vulnerable component.
    Unchanged
  • Confidentiality impactAn attacker can read all data the affected component holds, or the most sensitive parts of it.
    High
  • Integrity impactAn attacker can change any data or files the affected component protects.
    High
  • Availability impactAn attacker can take the component down completely or keep it from serving anyone.
    High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA's assessmentSSVC, from the CVE record
ExploitationActive

Attackers are exploiting this in the wild.

AutomatableNo

At least one step needs hands-on work, which slows mass attacks.

Technical impactTotal

A successful attack gives full control over the affected software or all of its data.

Public exploits

3 found
1 Metasploit1 Exploit-DB1 Scanner template0 GitHub PoCs

Links are to third-party code: never run it outside an isolated lab.

Timeline

  1. 2022-12-05
    CVE published
    CVE List
  2. 2022-12-05
    Metasploit module published
    Cacti 1.2.22 unauthenticated command injection
  3. 2023-02-16
    Added to CISA KEV
    Confirmed exploitation in the wild
  4. 2023-03-31
    Exploit published on Exploit-DB
    Cacti v1.2.22 - Remote Command Execution (RCE)
  5. 2025-12-03
    F5 ships a rule
    Cacti Command Execution
  6. 2026-11-02
    Our test: OWASP Core Rule Set blocked it
    paranoia level 1, anomaly threshold 5, default CRS settings
  7. 2026-11-02
    Our test: OWASP Core Rule Set blocked it
    paranoia level 2, anomaly threshold 5, default CRS settings

Social

2026-10-20: 0 posts2026-10-21: 0 posts2026-10-22: 0 posts2026-10-23: 0 posts2026-10-24: 0 posts2026-10-25: 0 posts2026-10-26: 0 posts2026-10-27: 0 posts2026-10-28: 0 posts2026-10-29: 0 posts2026-10-30: 0 posts2026-10-31: 0 posts2026-11-01: 0 posts2026-11-02: 0 posts

No posts seen yet on X, Bluesky, Mastodon, Hacker News or GitHub.

Vendor statements

Quoted
CloudflareWAF Managed RulesBefore feed history

The CVE predates the oldest entry in this vendor's public feed, so a rule may exist that we cannot see.

AWSAWS WAF Managed RulesNo public claim

We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. AWS often describes a vulnerability without naming its CVE (for example "Log4j"). We count only entries that name the CVE, so AWS coverage is understated.

Microsoft AzureFront Door and Application Gateway WAF (DRS)No public claim

We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. The rule tables name CVEs but carry no dates, so Azure is left out of every time-to-rule figure.

Google CloudCloud Armor preconfigured WAF rulesBefore feed history

The CVE predates the oldest entry in this vendor's public feed, so a rule may exist that we cannot see.

FastlyNext-Gen WAF virtual patchesBefore feed history

The CVE predates the oldest entry in this vendor's public feed, so a rule may exist that we cannot see.

F5Attack signatures (Distributed Cloud WAF)1 quoteRule published

First rule 2025-12-03, 1094 days after the CVE was published.

2025-12-03New rule200103669Source
Added: signature 200103669 "Cacti Command Execution" (Command Execution, risk High), systems: Other Web Server. References: CVE-2022-46169.
AkamaiApp & API Protector (Adaptive Security Engine)No public source

This vendor publishes no machine-readable rule changelog we can check.

OWASP CRSCore Rule Set (open source, used inside many WAFs)No public claim

We found no public statement from this vendor naming this CVE. That is not proof of no protection: generic rules may still catch it. CRS rarely names CVEs: it relies on generic detections. Our own lab measures what it actually blocks.