CVE-2022-46169: Cacti Command Injection Vulnerability
Yes. CVE-2022-46169 has been used in real attacks. CISA added it to its Known Exploited Vulnerabilities catalog on 16 February 2023. Public exploit code is available: 1 Metasploit module, 1 Exploit-DB entry and a Nuclei detection template. EPSS puts the chance of further exploitation attempts in the next 30 days at 99.8%.
- Exploited in real attacks
- Yes. On CISA's exploited list since 16 February 2023
- Used in ransomware
- Not known
- Public exploit code
- 1 Metasploit module, 1 Exploit-DB entry and a Nuclei detection template
- Chance of exploitation (EPSS)
- 99.8% in the next 30 days, higher than 99.9% of scored vulnerabilities. Scored 5 December 2026
- Severity (CVSS)
- 9.8 Critical (version 3.1)
- Affects
- Cacti Cacti
- Type of flaw
- Injection (CWE-74)
- Published
- 5 December 2022
- US federal patch deadline
- 9 March 2023
What it is
Cacti contains a command injection vulnerability that allows an unauthenticated user to execute code.
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 se
Description from the CVE record.
Is CVE-2022-46169 being exploited?
Yes. CISA lists a vulnerability as known exploited only when it has reliable evidence of exploitation in real attacks, and it added CVE-2022-46169 on 16 February 2023.
Public exploit code
These are public references that anyone, including an attacker, can find. Their existence lowers the skill needed to use the flaw.
| Source | Entry | Published |
|---|---|---|
| Metasploit | Cacti 1.2.22 unauthenticated command injection | |
| Nuclei template | Cacti <=1.2.22 - Remote Command Injection | |
| Exploit-DB | Cacti 1.2.22 - Remote Command Execution (RCE) | 31 March 2023 |
Affected products
- cacti: < 1.2.23
From the CVE record. Check the vendor advisory for the full list of fixed versions.
What to do
CISA's required action: Apply updates per vendor instructions.
Because this flaw has already been used in attacks, patching is only half the job. If an affected system was reachable while unpatched, check it for signs of compromise before trusting it again.
How to check whether you are exposed
- Find every copy. List each place Cacti runs, including test systems and anything set up outside IT.
- Compare versions. Match what you find against the affected versions in the vendor advisory.
- Check reachability. An affected system that faces the internet is urgent; one reachable only from inside still matters once an attacker has a foothold.
- Assume it has been scanned. A public Nuclei template exists for this flaw, so finding exposed systems across the internet is automated.
HackDrill
Find out whether this is reachable in your systems.
A version number tells you a system is affected. A hacking drill tells you whether an attacker can actually get in through a flaw like this one in Cacti. HackDrill's AI agents attack your product, infrastructure, network and cloud the way modern attackers do, and show you the real, exploitable gaps so you can fix them first.
Other tracked vulnerabilities in Cacti products
| CVE | What it affects | Status | EPSS | Published |
|---|---|---|---|---|
| CVE-2024-29895 | cacti | Public exploit | 98.8% | 13 May 2024 |
| CVE-2023-39361 | cacti | Public exploit | 88.7% | 5 September 2023 |
| CVE-2024-25641 | cacti | Public exploit | 86.5% | 13 May 2024 |
| CVE-2023-39362 | cacti | Public exploit | 84.8% | 5 September 2023 |
| CVE-2023-49085 | cacti | Public exploit | 74.5% | 22 December 2023 |
Sources
- CVE record for CVE-2022-46169
- NVD entry
- CISA Known Exploited Vulnerabilities catalog, version 2026.12.04
- FIRST EPSS, scores dated 5 December 2026
- github.com (x_refsource_CONFIRM)
- github.com (x_refsource_MISC)
- github.com (x_refsource_MISC)
- github.com (x_refsource_MISC)
Machine-readable: /api/cve/CVE-2022-46169.json