CVE-2022-46169
About
Rainforest analyst review
Cacti's `remote_agent.php` is reachable without authentication, and its access check can be defeated. The script identifies the caller by resolving the client IP to a hostname and matching it against the `poller` table, but it derives that IP from attacker-controllable `HTTP_`-prefixed headers such as `X-Forwarded-For`. Because a default poller entry carries the server's own hostname, spoofing the header to the server's address passes the check. Once authorized, the `polldata` action reaches `proc_open` with an attacker-supplied `poller_id`, so injecting shell metacharacters like `;id` runs arbitrary commands as the web-server user.
Cacti is a network-monitoring platform, so its servers are wired into infrastructure by design, holding SNMP credentials and device inventories that make a compromised instance a strong pivot into the rest of the environment. The prerequisite — a poller item with a PHP-script action — is met by common default templates, so most production instances are exploitable. This was widely scanned and exploited after disclosure. Upgrade to 1.2.23 or later, keep Cacti off the public internet, and review poller and log data for unexpected command execution.
References
- https://github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216
- https://github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9
- https://github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52b
- https://github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gf
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-46169
Related CVEs
Frequently asked questions
What is CVE-2022-46169?
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.
How severe is CVE-2022-46169?
CVE-2022-46169 carries a CVSS 3.1 base score of 9.8, rated critical. On the Rainforest Risk Index — which weighs the severity alongside how easy the flaw is to reach and how broad its impact is — it scores 99 out of 100, in the critical band.
How is CVE-2022-46169 exploited?
According to the CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H): attack vector Network, attack complexity Low, privileges required None, user interaction None. Impact on confidentiality High, integrity High and availability High.
Which products are affected by CVE-2022-46169?
Public advisories list the following as affected: cacti. Check the references on this page for the exact versions each vendor confirms.
How do I fix CVE-2022-46169?
Apply the fix the vendor published — the references on this page link to the primary advisories and patches. When patching can't happen right away, reduce the exposure of the affected component and watch it for exploitation attempts. Rainforest customers see this vulnerability correlated to their own assets and prioritized by real exposure, not by score alone.
Empower Your Security Strategy with Rainforest
Discover vulnerabilities early, prioritize critical threats, and protect what truly matters. Rainforest streamlines your security operations, saving you time and reducing costs, so you can focus on what drives your business forward.
