Appsecure logo

CVE-2022-46169: Critical Vulnerability in Cacti

CVE-2022-46169 is a critical command injection vulnerability in Cacti that allows unauthenticated users to execute arbitrary code. Organizations must address this immediately to prevent exploitation.

CRITICALKnown ExploitedCVSS 9.8 · Published December 5, 2022

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2022-46169 is a critical command injection vulnerability affecting Cacti, an open-source platform used for operational monitoring and fault management. This vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti when a specific data source is selected for any monitored device. It poses a significant risk due to the fact that the vulnerability can be exploited without authentication, making it accessible to attackers.

The vulnerability resides in the `remote_agent.php` file, which can be accessed without authentication. An attacker can bypass authorization checks through manipulation of HTTP headers, specifically the `Forwarded-For` header, allowing them to inject arbitrary commands. The CVSS score of 9.8 indicates critical severity, suggesting that organizations must prioritize remediation efforts immediately.

The date of publication for this vulnerability was December 5, 2022, and it has been addressed in subsequent releases of Cacti, specifically versions 1.2.23 and 1.3.x. Given the high likelihood of exploitation, it is imperative for organizations using affected versions to take action promptly.

Organizations should assess their exposure to this vulnerability and take necessary steps to mitigate the risk. This includes updating to patched versions and implementing security controls around access to the Cacti application.

As of now, the vulnerability is known to be actively exploited in the wild, which heightens the urgency for organizations to act swiftly.

Vulnerability Details

The command injection vulnerability allows unauthenticated users to execute arbitrary commands on the server by bypassing the authorization process in the `remote_agent.php` file, which is part of Cacti's functionality.

The vulnerability's CVSS score of 9.8 indicates the critical nature of this issue, with high impacts on confidentiality, integrity, and availability. Organizations should assess their configurations and ensure they are using versions of Cacti that have received the necessary patches.

Technical Analysis

The root cause of this vulnerability lies in the authorization bypass implemented in the `get_client_addr` function. The function checks several `$_SERVER` variables to determine the client's IP address, but these variables can be manipulated by an attacker. This flaw allows attackers to bypass authentication and execute arbitrary scripts using the `proc_open` function, leading to command injection vulnerabilities.

To exploit this vulnerability, an attacker must provide a `host_id` and `local_data_id`, which can be easily brute-forced. They then need to ensure that a `poller_item` exists with the action type `POLLER_ACTION_SCRIPT_PHP`, which is common in many Cacti instances.

Risk & Impact Analysis

The risk to organizations includes the potential for attackers to execute arbitrary code on vulnerable Cacti installations, leading to unauthorized access, data breaches, and complete system compromise. Given the critical nature of this vulnerability and its ease of exploitation, organizations must treat it with the highest urgency.

Exploitation Status

Signal

Status

Known Exploit

Yes

Public PoC

Yes

Actively Exploited

Yes

Ransomware Use

No

Affected Versions

All versions of Cacti prior to 1.2.23 are affected by this vulnerability. Organizations should ensure that they upgrade to at least this version to mitigate the vulnerability.

Mitigation & Remediation

To mitigate the risk posed by CVE-2022-46169, organizations should immediately upgrade to Cacti version 1.2.23 or later. If upgrading is not possible, organizations should implement network controls to restrict access to the Cacti application and monitor for any suspicious activity.

Organizations may also benefit from regular security assessments and penetration testing to identify and remediate similar vulnerabilities in their environments. Utilizing services like penetration testing can further enhance their security posture.

Detection Guidance

Organizations should monitor logs for unusual access patterns, especially to the `remote_agent.php` file. Behavioral anomalies such as unauthorized attempts to access or execute scripts should be flagged for investigation. Additionally, network signatures related to this vulnerability could aid detection efforts.

AppSecure Threat Intelligence Insight

The long-term significance of this vulnerability lies in its demonstration of the risks associated with inadequate input validation and authorization mechanisms. It serves as a reminder for development teams to prioritize secure coding practices to prevent similar vulnerabilities. Organizations should consider adopting comprehensive security frameworks and regular code reviews to enhance their defenses.

For more insights on securing applications, organizations can refer to resources on penetration testing methodologies and vulnerability management programs to further strengthen their security posture.

In summary, CVE-2022-46169 highlights critical security weaknesses in Cacti that require immediate attention from all organizations utilizing this platform.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.