CVE-2022-46169: Unauthenticated Command Injection
Cacti · cacti
Affected: cacti · Exploitation: in CISA KEV since 16 Feb 2023
Not in CyberSIXT coverage yet: no article names this CVE. This page shows the public record.
ExploitationIn CISA KEV
- In CISA KEVCISA KEV catalogue16 Feb 2023
- Exploited (reported): not seen
- Scanning observed: not seen
- Proof of concept public: not seen
- Not established: not seen
Higher than 99% of scored CVEs
DescriptionCVE.org
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.
Affected products1
From the CVE record. A product or version that is not listed is unknown, not unaffected.
- Cacti · cacti< 1.2.23
On the Atlas
Every published CVE is on the CyberSIXT Atlas, grouped by weakness, vendor and month.
- Exploitation
- Exploited in the wild. Listed in the CISA Known Exploited Vulnerabilities catalogue.
- CISA KEV
- Listed since 16 Feb 2023 · catalogue entry
- Public check
- Cacti <=1.2.22 - Remote Command Injection · nuclei template in projectdiscovery/nuclei-templates
- Vendor
- Cacti
- Published
- December 2022
What changed
- CISA added it to the KEV catalogue CISA
CoverageNo articles yet
No CyberSIXT article names CVE-2022-46169 yet, so there is no coverage timeline, action brief or change log for it. Everything on this page comes from the public CVE record, CISA KEV, EPSS and the nuclei template index. Search the archive or see the CVEs in the news.
References
- NVD entrynvd.nist.gov
- CISA KEV cataloguecisa.gov
- CVE recordcve.org
- Weakness CWE-74cwe.mitre.org
- github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gfgithub.com
- github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1egithub.com
- github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe30ef0egithub.com
- github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd867cfgithub.com