Cacti SQL Injection vulnerability
Description
Cacti provides an operational monitoring and fault management framework. In versions 1.2.25 and prior, it is possible to execute arbitrary SQL code through the pollers.php script. An authorized user may be able to execute arbitrary SQL code. The vulnerable component is the pollers.php. Impact of the vulnerability - arbitrary SQL code execution. As of time of publication, a patch does not appear to exist.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
9<=1.2.25+ 1 more
- (no CPE)range: <=1.2.25
- (no CPE)range: <= 1.2.25
- osv-coords7 versionspkg:rpm/opensuse/cacti&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/cacti&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/cacti-spine&distro=openSUSE%20Leap%2015.5pkg:rpm/suse/cacti&distro=SUSE%20Package%20Hub%2012pkg:rpm/suse/cacti&distro=SUSE%20Package%20Hub%2015%20SP5pkg:rpm/suse/cacti-spine&distro=SUSE%20Package%20Hub%2012pkg:rpm/suse/cacti-spine&distro=SUSE%20Package%20Hub%2015%20SP5
< 1.2.26-bp155.2.6.1+ 6 more
- (no CPE)range: < 1.2.26-bp155.2.6.1
- (no CPE)range: < 1.2.26-1.1
- (no CPE)range: < 1.2.26-bp155.2.6.1
- (no CPE)range: < 1.2.26-bp155.2.6.1
- (no CPE)range: < 1.2.26-bp155.2.6.1
- (no CPE)range: < 1.2.26-bp155.2.6.1
- (no CPE)range: < 1.2.26-bp155.2.6.1
Patches
Vulnerability mechanics
Root cause
"Missing input sanitization of the `dbhost` parameter in `pollers.php` allows direct interpolation of attacker-controlled data into a SQL query."
Attack vector
An authenticated attacker sends a POST request to `pollers.php?header=false` with `action=save` and a crafted `dbhost` parameter containing SQL injection payloads. The advisory demonstrates a payload using `"; select sleep(5); select * from poller where 1=1 and "%"="` which causes a 5-second database delay, confirming successful injection [ref_id=1]. The vulnerability supports multi-query execution, allowing an attacker to run multiple arbitrary SQL statements in a single request [ref_id=1].
Affected code
The vulnerability resides in `pollers.php`. The `form_save` action (line 321) calls `poller_host_duplicate` and passes the unsanitized `get_nfilter_request_var('dbhost')` value as the second parameter. Inside `poller_host_duplicate` (line 427), this attacker-controlled `$host` variable is used directly in a SQL query without escaping, enabling SQL injection [ref_id=1].
What the fix does
As of the time of publication, no patch exists [ref_id=1]. The advisory recommends improving user data escaping to prevent SQL injection as the general mitigation strategy [ref_id=1]. Without a code fix, the `dbhost` parameter remains unsanitized and directly interpolated into SQL queries in the `poller_host_duplicate` function.
Preconditions
- authAttacker must be an authenticated user of the Cacti application
- networkAttacker must have access to the pollers.php endpoint
- inputAttacker must supply a crafted dbhost parameter containing SQL injection payload
Reproduction
Send a POST request to `/cacti/pollers.php?header=false` with `Content-Type: application/x-www-form-urlencoded` and a body containing `action=save` and a `dbhost` parameter with a SQL injection payload such as `"; select sleep(5); select * from poller where 1=1 and "%"="`. The advisory shows the full HTTP request in Listing 1, including required cookies like `__csrf_magic` and the `Cacti` session cookie [ref_id=1]. A response delay of 5+ seconds confirms successful injection.
Generated on May 27, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/Cacti/cacti/blob/5f6f65c215d663a775950b2d9db35edbaf07d680/pollers.phpmitrex_refsource_MISC
- github.com/Cacti/cacti/security/advisories/GHSA-vr3c-38wh-g855mitrex_refsource_CONFIRM
- packetstormsecurity.com/files/176995/Cacti-pollers.php-SQL-Injection-Remote-Code-Execution.htmlmitre
- lists.debian.org/debian-lts-announce/2024/03/msg00018.htmlmitre
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RBEOAFKRARQHTDIYSL723XAFJ2Q6624X/mitre
News mentions
0No linked articles in our index yet.