Description
SQL injection vulnerability in templates_export.php in Cacti 0.8.7e and earlier allows remote attackers to execute arbitrary SQL commands via the export_item_id parameter.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cacti | 0.8.7e-3 | — |
| Debian 13 | cacti | 0.8.7e-3 | — |
| Debian 12 | cacti | 0.8.7e-3 | — |
| Debian 5.0 | cacti | 0.8.7b-2.1+lenny2 | DSA-2039-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hpc Solution 1 | GeoIP +1 | 1.4.7-0.1.20090931cvs.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | blacs-mvapich1-gnu | 20000224-7 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | blacs-openmpi-gnu | 20000224-9 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | cacti | 0.8.7g-1.1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-RHEL-OFED +1 | 5.5-2 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-cacti | 0.1-49 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-ganglia-agent-v3_0 | 3.0-3.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-ganglia-server-v3_0 | 3.0-3 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-lava-compute-v1_0 | 1.0-6 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-mvapich1-libraries | 0.1-4 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-nagios-installer-v2_12 | 2.12-4 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | component-ntop-v3_3 | 3.3-12 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | environment-modules | 3.2.7b-7.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | iozone | 3-5.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-cacti | 0.8.7-47 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-ganglia | 3.0-8 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-hpc | 0.1-5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-lava | 1.0-11 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-nagios | 2.12-6 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-ntop | 3.3-13 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kit-rhel_java | 1.6.0-3.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kusu-appglobals-tool | 5.5-1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | kusu-ui +26 | 5.5-1 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | lava +3 | 1.0-10 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | linpack-mvapich1-gnu | 1.0a-7 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | linpack-openmpi-gnu | 1.0a-6 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | nagios-plugins +53 | 1.4.14-1.1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | netcdf +1 | 3.6.2-7.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | nrpe +1 | 2.12-12.1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | ntop | 3.3.9-7.1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | pcm | 1.2-6 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | pcm-kit-base | 1.2-4 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | pcm-kit-hpc | 1.0-22 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | pcm-kit-ntop | 1.1-2 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | platform_mvapich | 1.2.0-0.3635.1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | primitive | 0.1.1-2 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | python-IPy | 0.70-1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | python-psycopg2 +2 | 2.0.14-1.el5 | RHSA-2010:0635 |
| Red Hat Hpc Solution 1 | scalapack-openmpi-gnu +1 | 1.8.0-9 | RHSA-2010:0635 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Cacti 0.8.7e - SQL Injection EDB-12338 · webapps · Apr 22, 2010 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- DSA-2039-1 cacti - missing input sanitising Debian Security (DSA / DLA) · Mar 9, 2026
- RHSA-2010:0635 Red Hat Security Advisory: Red Hat High Performance Computing (HPC) Solution 5.5 Red Hat Security Advisories (RHSA) · Jan 29, 2026
References
- 20100421 Bonsai Information Security - SQL Injection in Cacti <= 0.8.7e mailing-list
- ADV-2010-0986 vdb-entry
- DSA-2039 vendor-advisory
- http://www.cacti.net/downloads/patches/0.8.7e/sql_injection_template_export.patch
- ADV-2010-1107 vdb-entry
- SUSE-SR:2010:011 vendor-advisory
- 41041 third-party-advisory
- 39568 third-party-advisory
- RHSA-2010:0635 vendor-advisory
- MDVSA-2010:092 vendor-advisory
- ADV-2010-2132 vdb-entry
- 39653 vdb-entry
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578909
- 39572 third-party-advisory
- http://www.exploit-db.com/sploits/Bonsai-SQL_Injection_in_Cacti.pdf