A zero-day vulnerability in the Cacti network monitoring platform can allow an unauthenticated attacker to execute commands on a vulnerable server. A cybersecurity researcher known as ek0ms savi0r has published a proof-of-concept exploit that uses as few as four HTTP requests, although exploitation requires Cacti’s guest account to be enabled.
Four-request exploit targets Cacti guest functionality
The exploit, named 4HTTP2 shell and formerly known as 4HTTP2ROOT, was published on Thanksgiving Day by ek0ms savi0r of the Church of Malware.
Cacti is an open-source network monitoring and graphing tool used to track the performance of servers, routers, switches, firewalls and other network infrastructure. The software can store credentials and SNMP passphrases for accessing monitored devices and reading data, meaning a compromised Cacti server could potentially provide access to other systems on a corporate network.
The researchers published technical documentation, a proof-of-concept exploit and a video demonstration in a GitHub repository named “Sad Girls 0day Club.”
“We found a path to execute commands as a Cacti server user from a new unauthenticated HTTP session in four requests: no login, no valid API key, no phishing. Only four HTTP requests to the default guest surface,” the researchers explained.
Weak input validation enables command execution
The vulnerability is caused by weak input validation that allows an unauthenticated attacker to inject SQL statements into Cacti’s database and modify commands executed by the application’s real-time poller.
The attack does not require valid credentials, but the Cacti guest account must be enabled. According to cybersecurity company RavenAI, the exploit abuses weak validation of the guest user’s graph display settings, resulting in a stored SQL injection vulnerability.
An attacker can store malicious SQL statements in the guest user’s graph display settings. After Cacti saves those settings in its database and processes them, the statements can modify the poller’s configuration and execute malicious operating system commands.
Researchers tested the exploit against Cacti Core 1.2.31, but it remains unclear whether earlier versions are also vulnerable.
Privilege level depends on server configuration
Although the researchers demonstrated an exploit that provided root access on vulnerable servers, watchTowr explains that the privileges obtained depend on the account used to run the Cacti web server and poller processes.
In many deployments, those processes may run under a less-privileged web server account rather than root.
Researchers criticize vulnerability disclosure practices
In another post in the GitHub repository, ek0ms savi0r criticized how companies handle vulnerability disclosures. The researcher said that years of security reports had been dismissed or closed as duplicates, expected behavior or issues that could not be reproduced.
“Security researchers aren’t the bad guys. We’re trying to help. We’ve read the documentation, written reproductions, and sent packet captures,” the researchers wrote.
“We’re being policed because we’re being gassed for years by multibillion-dollar corporations that treat disclosure like a PR issue.”
In an Instagram post announcing the Cacti exploit, the researchers shared a video demonstration of the proof of concept and said the vulnerability had not been reported to Cacti before its release.
Recommended mitigations
Until a patch is released, administrators should disable Cacti guest accounts and restrict access to the application’s web interface to trusted networks.
Administrators should also inspect the poller configuration for unexpected commands and review application logs for warnings involving non-numeric values in graph display settings, which could indicate an exploitation attempt.
As of November 27, there were no reports that the vulnerability had been exploited.
Source: www.bleepingcomputer.com


