--- title: "CVE-2022-46169: Unauthenticated Command Injection | CubePath" description: "Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected…" language: en source: https://cubepath.com/security/cve/CVE-2022-46169 --- # CVE-2022-46169: Unauthenticated Command Injection | CubePath ## Description 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: \`. 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. Official description from the CVE record, published by GitHub\_M. Copyright © 1999-2026 The MITRE Corporation. See [/security/cve/legal](https://cubepath.com/security/cve/legal) for the CVE license. [View the record on cve.org](https://www.cve.org/CVERecord?id=CVE-2022-46169) ## Key data ### CVSS 3.1 Critical 9.8 Score published by GitHub\_M in the CVE record. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | Metric | Value | What it means | | ---------------------- | --------- | ----------------------------------------------------------------------------------- | | Attack vector | Network | The vulnerable component can be reached over a network, possibly from the Internet. | | Attack complexity | Low | No special conditions are needed. The attack can be repeated at will. | | Privileges required | None | No account or privileges are needed. | | User interaction | None | No action from any user is needed. | | Scope | Unchanged | The impact stays within the vulnerable component. | | Confidentiality impact | High | Serious or total effect on the secrecy of data. | | Integrity impact | High | Serious or total effect on the trustworthiness of data. | | Availability impact | High | Serious or total effect on availability. | CVSS is owned and managed by FIRST.Org, Inc. (FIRST) and is used by permission. Each CVSS score on this site is shown together with its vector string, as published in the CVE record by the source named next to it. Learn more at [first.org/cvss](https://www.first.org/cvss/) . ### EPSS Exploit Prediction Scoring System by FIRST: an estimate of the probability that exploitation activity will be observed in the next 30 days. Score 0.99826 (99.8% probability) Percentile 99.96% Scores of Nov 10, 2026 Model v2026.06.15 ### CISA Known Exploited Vulnerabilities This CVE is listed in the CISA KEV catalog. Name in the catalog Cacti Command Injection Vulnerability Added to the catalog Feb 16, 2023 Federal due date Mar 9, 2023 ### CISA assessment as of May 13, 2024 Stakeholder-Specific Vulnerability Categorization (SSVC) decision points added by CISA. Exploitation Recorded by CISA as active Automatable no Technical impact total ### Weakness (CWE) CWE catalog version 5.0. CWE names: Copyright © 2006-2026, The MITRE Corporation. See [/security/cve/legal](https://cubepath.com/security/cve/legal) for the CWE license. - [CWE-74](https://cwe.mitre.org/data/definitions/74.html) Improper Neutralization of Special Elements in Output Used by a Downstream Component ## Affected products Products listed in the CVE record, as the CNA published them. - cacti - affected: < 1.2.23 ## References Links listed in the CVE record. They lead to other sites, which CubePath does not control. - [github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-3…](https://github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gf) - [github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3…](https://github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216) - [github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe3…](https://github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9) - [github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd…](https://github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52b) ## Timeline 1. ID reserved Nov 28, 2022 2. Record published Dec 5, 2022 3. Added to CISA KEV Feb 16, 2023 4. Record last updated Oct 21, 2025 ## Look up another CVE ## About CubePath CubePath is a cloud provider with data centers in Europe and the United States. It offers VPS, bare metal servers and DDoS protection. [Cloud VPS](https://cubepath.com/vps) [DDoS protection](https://cubepath.com/ddos-protection) Data from the CVE Program (MITRE), CISA KEV and FIRST EPSS. CVSS is owned by FIRST and used by permission. Not affiliated with or endorsed by MITRE, CISA or FIRST. Data as of Nov 10, 2026, 19:26 UTC. [Sources and licenses](https://cubepath.com/security/cve/legal)