9.8
CVSSv3

CVE-2022-46169

Published: 05/12/2022 Updated: 07/11/2023
CVSS v3 Base Score: 9.8 | Impact Score: 5.9 | Exploitability Score: 3.9
VMScore: 0

Vulnerability Summary

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 malicious user 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.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

cacti cacti

Vendor Advisories

Debian Bug report logs - #1025648 cacti: CVE-2022-46169: Unauthenticated Command Injection Package: src:cacti; Maintainer for src:cacti is Cacti Maintainer &lt;pkg-cacti-maint@listsaliothdebianorg&gt;; Reported by: Salvatore Bonaccorso &lt;carnil@debianorg&gt; Date: Tue, 6 Dec 2022 20:39:01 UTC Severity: grave Tags: securit ...
Two security vulnerabilities have been discovered in Cacti, a web interface for graphing of monitoring systems, which could result in unauthenticated command injection or LDAP authentication bypass For the stable distribution (bullseye), these problems have been fixed in version 1216+ds1-2+deb11u1 We recommend that you upgrade your cacti packag ...
A flaw was found in how Cacti grants authorization based on IP address which allows authentication bypass, and possibly arbitrary command execution if a poller_item configured with a POLLER_ACTION_SCRIPT_PHP action is present This updated cacti package adds a feature allowing an administrator to explicitly list headers suitable for use in client a ...

Exploits

Cacti version 1222 suffers from a remote command execution vulnerability ...
This Metasploit module exploits an unauthenticated command injection vulnerability in Cacti versions through 1222 in order to achieve unauthenticated remote code execution as the www-data user ...
This module exploits an unauthenticated command injection vulnerability in Cacti through 1222 (CVE-2022-46169) in order to achieve unauthenticated remote code execution as the www-data user The module first attempts to obtain the Cacti version to see if the target is affected If LOCAL_DATA_ID a ...

Metasploit Modules

Cacti 1.2.22 unauthenticated command injection

This module exploits an unauthenticated command injection vulnerability in Cacti through 1.2.22 (CVE-2022-46169) in order to achieve unauthenticated remote code execution as the www-data user. The module first attempts to obtain the Cacti version to see if the target is affected. If LOCAL_DATA_ID and/or HOST_ID are not set, the module will try to bruteforce the missing value(s). If a valid combination is found, the module will use these to attempt exploitation. If LOCAL_DATA_ID and/or HOST_ID are both set, the module will immediately attempt exploitation. During exploitation, the module sends a GET request to /remote_agent.php with the action parameter set to polldata and the X-Forwarded-For header set to the provided value for X_FORWARDED_FOR_IP (by default 127.0.0.1). In addition, the poller_id parameter is set to the payload and the host_id and local_data_id parameters are set to the bruteforced or provided values. If X_FORWARDED_FOR_IP is set to an address that is resolvable to a hostname in the poller table, and the local_data_id and host_id values are vulnerable, the payload set for poller_id will be executed by the target. This module has been successfully tested against Cacti version 1.2.22 running on Ubuntu 21.10 (vulhub docker image)

msf > use exploit/linux/http/cacti_unauthenticated_cmd_injection
msf exploit(cacti_unauthenticated_cmd_injection) > show targets
    ...targets...
msf exploit(cacti_unauthenticated_cmd_injection) > set TARGET < target-id >
msf exploit(cacti_unauthenticated_cmd_injection) > show options
    ...show and set options...
msf exploit(cacti_unauthenticated_cmd_injection) > exploit

Github Repositories

This Python script aids in exploiting CVE-2022-46169 by automating payload delivery and response handling. It starts an HTTP server, listens for requests, and enables command input for real-time interaction with a vulnerable target.

CVE-2022-46169 Pseudo Shell Description This Python script serves as a helper tool to streamline the process of exploiting the CVE-2022-46169 vulnerability It starts an HTTP server that listens for incoming requests and provides a simple interface for the user to input commands These commands are then executed on the target server, automating the process of sending crafted pa

Automated exploit scanner for cameras on the internet

Internet Camera Exploitation Tool This is a tool meant to assist cyber security researchers on discovering outdated and vulnerable camera systems on the internet by utilizing shodanio I was able to discover thousands of vulnerable cameras using it Vendors Affected [+] Hikvision [+] Avtech [+] TVT [+] Cacti more to come Features Fetching of hosts from shodanio Check for

This is poc of CVE-2022-46169 authentication bypass and remote code execution

CVE-2022-46169 PoC: Authentication Bypass and Remote Code Execution This repository contains a PoC for the CVE-2022-46169 vulnerability, which allows an attacker to bypass authentication and execute arbitrary code remotely on the affected system This vulnerability affects Cacti, version 1222, released on August 18, 2022 The vulnerability occurs due to remote_agentphp has a

CVE-2022-46169 Cacti remote_agent.php Unauthenticated Command Injection.

CVE-2022-46169 CVE-2022-46169 Cacti remote_agentphp Unauthenticated Command Injection Auth Bypass Add X-Forwarded-For header to bypass authentication, note that its value is not a fixed value Brute Force Use Burp Intruder to fuzz test the values of host_id and local_data_ids RCE The point of command injection is the poller_id parameter GET /cacti/remote_agentphp?actio

Cacti: Unauthenticated Remote Code Execution Exploit in Ruby

Cacti | Auth Bypass | RCE | CVE-2022-46169 Cacti: Unauthenticated Remote Code Execution Exploit in Ruby Cacti Docker This is a dockerized application that is vulnerable to the Cacti RCE vulnerability (CVE-2022-46169) Follow the link to get Cacti running githubcom/vulhub/vulhub/tree/master/cacti/CVE-2022-46169 Usage _____

Unauthenticated Command Injection in Cacti <= 1.2.22

CVE-2022-46169 PoC: Authentication Bypass and Remote Code Execution This repository contains a PoC for the CVE-2022-46169 vulnerability, which allows an attacker to bypass authentication and execute arbitrary code remotely on the affected system This vulnerability affects Cacti, version 1222, released on August 18, 2022 The vulnerability occurs due to remote_agentphp has a

CVE-2022-46169 - Cacti Blind Remote Code Execution (Pre-Auth)

CVE-2022-46169 Cacti Blind Remote Code Execution (Pre-Auth) Disclaimer This is for educational purposes only I am not responsible for your actions Use at your own discretion Explanation This script bruteforces variables required to exploit this vulnerability This exploit requires the following 3 variables: Whitelisted IP address Correct host_id parameter Correct local_data

PoC for CVE-2022-46169 - Unauthenticated RCE on Cacti <= 1.2.22

CVE-2022-46169 This repository contains a Proof of Concept (PoC) for CVE-2022-46169 - Unauthenticated RCE on Cacti &lt;= 1222 by chaining an Authentication Bypass and a Command Injection, described by Sonar in this blog post The same vulnerabilities were also discovered by: Steven Seeley (mr_me) of Source Incite Usage: positional arguments: target URL o

A simple PoC for CVE-2022-46169 a.k.a Cacti Unauthenticated Command Injection, a vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti prior from version 1.2.17 to 1.2.22

Cacti Unauthenticated Command Injection (CVE-2022-46169) This is a simple PoC adaptation of the Vulnhub's Cacti scenario You can check it out here Cacti is a robust and extensible operational monitoring and fault management framework for users around the world A command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running C

PoC for CVE-2022-46169 - Unauthenticated RCE on Cacti <= 1.2.22

CVE-2022-46169 This repository contains a Proof of Concept (PoC) for CVE-2022-46169 - Unauthenticated RCE on Cacti &lt;= 1222 by chaining an Authentication Bypass and a Command Injection, described by Sonar in this blog post The same vulnerabilities were also discovered by: Steven Seeley (mr_me) of Source Incite Usage: positional arguments: target URL o

CVE-2022-46169

CVE 2022-46169 This script exploits an unauthenticated command injection vulnerability in Cacti versions through 1222 in order to achieve unauthenticated remote code execution and gain a reverse shell

Exploit for cacti version 1.2.22

CVE-2022-46169 Exploit for cacti version 1222, CVE-2022-46169 Usage $ python3 cactipy

Exploit for cacti version 1.2.22

CVE-2022-46169 Exploit for cacti version 1222, CVE-2022-46169 Usage $ python3 cactipy

Proof of concept / CTF script for exploiting CVE-2022-46169 in Cacti, versions >=1.2.22

CVE-2022-46169 POC Proof of concept / CTF script for exploiting CVE-2022-46169 in Cacti, versions &gt;=1222 This script was written to solve a CTF challenge It was based on the following example scripts - I had difficulty understanding what these scripts actually did, so I re-wrote my own interpretation of them, which helped me understand how the exploit works

Exploit for cacti version 1.2.22

CVE-2022-46169 Exploit for cacti version 1222, CVE-2022-46169 Usage $ python3 cactipy

CVE-2022-46169 CVE-2022-46169 is a security vulnerability found in Cacti, a network monitoring and management software This vulnerability allows an attacker to remotely exploit the system without authentication by sending a specially crafted HTTP request By taking advantage of this vulnerability, the attacker can execute arbitrary system commands on the target system This po

Improved PoC for Unauthenticated RCE on Cacti <= 1.2.22 - CVE-2022-46169

CVE-2022-46169 This repository contains a Proof of Concept (PoC) for CVE-2022-46169 - Unauthenticated RCE on Cacti &lt;= 1222 You can read more about the vulnerability here The script adds a reverse shell handler and is based on the code written by sAsPeCt488 You can view the original code here Usage python3 CVE-2022-46169py -t 10129211250 -i 10101472 -p 4444

PoC for CVE-2022-46169 that affects Cacti 1.2.22 version

CVE-2022-46169 POC This is a Proof of Concept (POC) script for the CVE-2022-46169 vulnerability that affects Cacti version 1222 Description The CVE-2022-46169 vulnerability allows an unauthenticated command injection in Cacti versions through 1222 in order to achieve unauthenticated remote code execution as the www-data user The vulnerability is caused by improper validat

Repo for CVE-2022-46169

CVE-2022-46169 CVE-2022-46169 Cacti remote_agentphp Unauthenticated Command Injection This script checks only the conditions of CVE-2022-46169 What is Cacti? 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 u

CVE-2022-46169

CVE-2022-46169 CVE-2022-46169 python CVE-2022-46169py taget_url

RCE POC for CVE-2022-46169

Exploit For CVE-2022-46169 Getting Reverse Shell cacti_exploitpy &lt;URL&gt; &lt;LOCAL_MACHINE_IP&gt; &lt;LOCAL_PORT&gt;

🐍 Python Exploit for CVE-2022-46169

CVE-2022-41343 🐍 Python Exploit for CVE-2022-46169 Staged Reverse Shell for Cacti &lt;= 1222 Example cve-2022-46169 1010145 44444 -u cactihtb Usage usage: cve-2022-46169 [-h] -u URL [-s SHELL] ip port positional arguments: ip Shell Callback IP Address/Host port Shell Callback Po

Exploit to CVE-2022-46169 vulnerability

CVE-2022-46169 Exploit Exploit to CVE-2022-46169 vulnerability on Cacti 1219 [Options] -u --url victim's url -f --forwarded X-Forwarded value to bypass the auth -m --mode: check for Checking for Vulnerable Servers, or exploit for Fun exploitation mode :D [Usage] 1 $&gt; /cve_2022_46169py -u 10101010/cacti -f 101

Cacti cve statistics Данный репозиторий создан в рамках исследовательского проекта с целью сбора статистики о количестве экземпляров Cacti в России, которые потенциально могут быть уязвимы к CVE-2022-46169 Данные собираб

CVE-2022-46169 Setup git clone githubcom/miko550/CVE-2022-46169git cd CVE-2022-46169 Usage usage: CVE-2022-46169py [-h] [-t TARGET] [-l LIST] options: -h, --help show this help message and exit -t TARGET, --target TARGET The URL of the target, eg: 127001 -l LIST, --list LIST List of target url sape

CVE-2022-46169 PoC - Unauthenticated RCE in Cacti 1222 This repo contains an exploit for CVE-2022-46169, affecting Cacti 1222 This vulnerability allows an unauthenticated attacker to execute arbitrary code on the affected system If you want a detailed write up of how this exploit is possible please reference this Rapid7 post They go into great detail on specifics I wrot

Wazuh_Cacti Sample logs to test wazuh detection on Cacti CVE-2022-46169

CVE-2022-46169

Cacti remote_agentphp 远程命令执行漏洞 CVE-2022-46169 漏洞描述 Cacti是一个服务器监控与管理平台。在其1217-1222版本中存在一处命令注入漏洞,攻击者可以通过X-Forwarded-For请求头绕过服务端校验并在其中执行任意命令。 漏洞影响 Cacti &lt; 1217-1222 网络测绘 app="Cacti-监控系统" 漏洞

Improved PoC for Unauthenticated RCE on Cacti <= 1.2.22 - CVE-2022-46169

CVE-2022-46169 This repository contains a Proof of Concept (PoC) for CVE-2022-46169 - Unauthenticated RCE on Cacti &lt;= 1222 You can read more about the vulnerability here The script adds a reverse shell handler and is based on the code written by sAsPeCt488 You can view the original code here Usage python3 CVE-2022-46169py -t 10129211250 -i 10101472 -p 4444

Fixed exploit for CVE-2022-46169 (originally from https://www.exploit-db.com/exploits/51166)

CVE-2022-46169 Fixed exploit for CVE-2022-46169 (originally from wwwexploit-dbcom/exploits/51166)

WARNING: This is a vulnerable application to test the exploit for the Cacti command injection (CVE-2022-46169). Run it at your own risk!

Cacti v1222 command injection (CVE-2022-46169) vulnerable application This is a vulnerable application to test the exploit for the Cacti vulnerability (CVE-2022-46169) WARNING! This application contains serious security vulnerabilities Run it at your own risk! It is recommended using a backed-up and sheltered environment (such as a VM with a recent snapshot and host-only ne

CVE-2022-46169 unauthenticated remote code execution Description Authentication Bypass: a hostname-based authorization check is not implemented safely for most installations of Cacti Command Injection: unsanitized user input is propagated to a string used to execute an external command Demo

An advanced RCE tool tailored for exploiting a vulnerability in Cacti v1.2.22. Crafted with precision, this utility aids security researchers in analyzing and understanding the depth of the CVE-2022-46169 flaw. Use responsibly and ethically.

Sure! Here's a "dope" READMEmd for your PricklyPwn project: 🌵 PricklyPwn 🌵 Penetrate with precision A Remote Command Execution Exploit for Cacti v1222 Table of Contents Description Installation Usage Ethical Notice Description PricklyPwn is a sleek, high-performance tool crafted in Go, designed to exploit the Remote Command Execution (RCE) vulner

Unauthenticated Remote Code Execution through authentication bypass and command injection in Cacti < 1.2.23 and < 1.3.0

CVE-2022-46169 - Unauthenticated Remote Code Execution Cacti Unauthenticated Remote Code Execution through authentication bypass and command injection in Cacti &lt; 1223 and &lt; 130 DISCLAIMER: This script is made to audit the security of systems Only use this script on your own systems or on systems you have written permission to exploit

This Python script aids in exploiting CVE-2022-46169 by automating payload delivery and response handling. It starts an HTTP server, listens for requests, and enables command input for real-time interaction with a vulnerable target.

CVE-2022-46169 Pseudo Shell Description This Python script serves as a helper tool to streamline the process of exploiting the CVE-2022-46169 vulnerability It starts an HTTP server that listens for incoming requests and provides a simple interface for the user to input commands These commands are then executed on the target server, automating the process of sending crafted pa

Este es un código del exploit CVE-2022-46169, que recree utilizando Python3! Si por ahí estás haciendo una máquina de HTB, esto te puede ser útil... 🤞✨

RCE-Cacti-1222 Este es un código del exploit CVE-2022-46169, que recree utilizando Python3! Si por ahí estás haciendo una máquina de HTB, esto te puede ser útil 🤞✨

Cacti Unauthenticated Command Injection

CVE-2022-46169 (Cacti Command Injection) This repo is part of the hgrab-framework Affected product Cacti prior to v1222 Installation Install the app on the server user@domain:~# git clone githubcom/Inplex-sys/CVE-2022-46169git user@domain:~# cd /CVE-2022-46169/ user@domain:~# python3 mainpy &lt;listtxt&gt; &lt;command&gt;

Powerful and customizable vulnerability scanner based on VDSL, which can replace Nessus or Nuclei, etc. 万象通用漏洞扫描器,支持强大的PoC脚本语言、先进易用的PoC开发和调试IDE、现代化无需等待OOB服务器。可替代Nessus和Nuclei等漏洞扫描产品。

CVS Cosmos Vulnerability Scanner Features • Usage • For Security Engineers • Credits • Contact • License English 中文 Like many products such as Nessus and Nuclei, CVS is used to scan for various network vulnerabilities, but it is more modern with a wait free OOB testing strategy, advanced vulnerability PoC IDE, and powerf

This is a exploit of CVE-2022-46169 to cacti 1.2.22. This exploit allows through an RCE to obtain a reverse shell on your computer.

CVE-2022-46169-CACTI-1222 This is a exploit of CVE-2022-46169 to cacti 1222 This exploit allows through an RCE to obtain a reverse shell on your computer Requirement optparse requests Usage On a port on your machine listen and then run the exploit as follows python3 CVE-2022-46169py -u 10129216153 --LHOST=10101623 --LPORT=443 Checking The target is vuln

Exploit for CVE-2022-46169

CVE-2022-46169 Exploit for CVE-2022-46169 Cacti versions before 123 Here remote_client_authorized checks the clients hostname in poller table for entry function remote_client_authorized() { // $client_addr = get_client_addr(); // $client_name = gethostbyaddr($client_addr); // $pollers = db_fetch_assoc('SELECT * FROM poller', true, $pol