CVE-2022-46169: Unauthenticated Command Injection
Noroxi assessment
Priority: Now (action score 99/100)
- CISA has confirmed exploitation in the wild (Feb 16, 2023). Remediation deadline for US federal agencies: Mar 9, 2023.
- A ready-made attack module is public (Metasploit, Nuclei); exploiting it takes no special expertise.
- Probability of exploitation in the next 30 days: 99.8% (FIRST EPSS); higher than 99.9% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: cacti (Debian:10) 1.2.2+ds1-2+deb10u5; cacti (Debian:11) 1.2.16+ds1-2+deb11u1; cacti (Debian:12) 1.2.22+ds1-3.
- Mentioned 1 time in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Patch today or shut off access. Upgrade to cacti (Debian:10) 1.2.2+ds1-2+deb10u5; cacti (Debian:11) 1.2.16+ds1-2+deb11u1; cacti (Debian:12) 1.2.22+ds1-3 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · CISA KEV · FIRST EPSS
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.
- Published
- Dec 5, 2022
- Updated
- Jun 17, 2026
- EPSS
- 99.8% · 99th percentile
- CWE
- CWE-74
Report tools
Action score
99
Now
Patch today or shut off access.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 30 / 30 · Listed
- EPSS
- 30 / 30 · 99.8%
CISA SSVC decision
- Exploitation
- active
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 9.8
- CNA · GitHub_M
- 9.8
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Actively exploited in the wild
CISA added this to its Known Exploited Vulnerabilities catalog on Feb 16, 2023. That signals real attacks, not theory.
Remediation deadline for US federal agencies: Mar 9, 2023.
Get told when this record changes
- In CISA KEV: exploitation in the wild confirmed
- Weaponized exploit exists
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| cacti | cacti | cpe:2.3:a:cacti:cacti |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- cacti cactibefore 1.2.23
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
Cacti cacti
- < 1.2.23affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:10 | cacti | before 1.2.2+ds1-2+deb10u5 | 1.2.2+ds1-2+deb10u5 |
| Debian:11 | cacti | before 1.2.16+ds1-2+deb11u1 | 1.2.16+ds1-2+deb11u1 |
| Debian:12 | cacti | before 1.2.22+ds1-3 | 1.2.22+ds1-3 |
| openSUSE:Leap 15.4 | cacti | before 1.2.23-bp154.2.6.1 | 1.2.23-bp154.2.6.1 |
| openSUSE:Leap 15.4 | cacti-spine | before 1.2.23-bp154.2.6.1 | 1.2.23-bp154.2.6.1 |
| openSUSE:Tumbleweed | cacti | before 1.2.23-1.1 | 1.2.23-1.1 |
| SUSE:Package Hub 12 | cacti | before 1.2.23-bp154.2.6.1 | 1.2.23-bp154.2.6.1 |
| SUSE:Package Hub 12 | cacti-spine | before 1.2.23-bp154.2.6.1 | 1.2.23-bp154.2.6.1 |
Same product
cacti: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-29895Cacti command injection in cmd_realtime.php70This week
- CVE-2023-39361Unauthenticated SQL Injection in graph_view.php in Cacti66This week
- CVE-2023-49085Cacti SQL Injection vulnerability57Plan
Published before and after this one in the same product
- ← EarlierCVE-2021-3816Jan 19, 2022 · Cacti 1.1.38 allows authenticated users with User Management permissions to inject arbitrary HTML in the group_prefix field during the creat21Monitor
- ← EarlierCVE-2022-0730Mar 3, 2022 · Under certain ldap conditions, Cacti authentication can be bypassed with certain credential types.40Plan
- Later →CVE-2023-37543Aug 10, 2023 · Cacti before 1.2.6 allows IDOR (Insecure Direct Object Reference) for accessing any graph via a modified local_graph_id parameter to graph_x30Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:cacti | 1.2.22+ds1-3 · Debian:12 | Package registry (OSV) |
| opensuse:cacti | 1.2.23-bp154.2.6.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| opensuse:cacti-spine | 1.2.23-bp154.2.6.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| suse:cacti | 1.2.23-bp154.2.6.1 · SUSE:Package Hub 12 | Package registry (OSV) |
| suse:cacti-spine | 1.2.23-bp154.2.6.1 · SUSE:Package Hub 12 | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
- Exploit-DB entry ×1
- Nuclei detection template ×1
- Proof-of-concept repository on GitHub ×37
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | webapps | 2023-03-31 |
| Metasploit module | exploit/linux/http/cacti_unauthenticated_cmd_injectionCacti 1.2.22 unauthenticated command injectionexploit | 2022-12-05 |
| Nuclei detection template | Nuclei template CVE-2022-46169 | — |
| Proof-of-concept repository on GitHub | stars:0 | 2022-12-07 |
| Proof-of-concept repository on GitHub | stars:47 | 2022-12-08 |
| Proof-of-concept repository on GitHub | stars:1 | 2022-12-16 |
| Proof-of-concept repository on GitHub | stars:3 | 2023-01-02 |
| Proof-of-concept repository on GitHub | stars:29 | 2023-01-05 |
| Proof-of-concept repository on GitHub | stars:9 | 2023-01-13 |
| Proof-of-concept repository on GitHub | stars:2 | 2023-01-15 |
| Proof-of-concept repository on GitHub | stars:3 | 2023-01-16 |
| Proof-of-concept repository on GitHub | stars:0 | 2023-02-02 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Metasploit-1 d
- Published
- First PoC+1 d
- CISA KEV+72 d
- TodayNov 3, 2026+1429 d
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-22-0723 · Dec 6, 2022(Cacti Güvenlik Güncellemesi)
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Server Side Include (SSI) InjectionCAPEC-101likelihood: High · High
- HTTP Request SplittingCAPEC-105likelihood: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Double EncodingCAPEC-120likelihood: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
- Format String InjectionCAPEC-135likelihood: High · High
- Client-side Injection-induced Buffer OverflowCAPEC-14likelihood: Medium · High
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.