CVE-2025-26794

7.5 HIGH

📋 TL;DR

Exim mail servers running versions 4.98 before 4.98.1 with SQLite hints and ETRN serialization enabled are vulnerable to remote SQL injection attacks. This allows attackers to potentially execute arbitrary SQL commands on the database backend. Only non-default configurations using these specific features are affected.

💻 Affected Systems

Products:
  • Exim
Versions: 4.98 before 4.98.1
Operating Systems: All operating systems running affected Exim versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when both SQLite hints and ETRN serialization features are enabled in non-default configurations. Rate-limit configurations may require update to 4.99.1 for complete resolution.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote attacker executes arbitrary SQL commands, potentially leading to database compromise, data exfiltration, or privilege escalation to execute system commands via SQL functions.

🟠

Likely Case

Attacker manipulates SQL queries to extract sensitive data from Exim's SQLite database, potentially exposing mail routing information, user credentials, or configuration details.

🟢

If Mitigated

With proper network segmentation and access controls, impact is limited to the Exim service and its associated database, preventing lateral movement.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires specific non-default configuration and understanding of Exim's SQLite integration. No public exploit code identified at this time.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.98.1 or 4.99.1 (depending on rate-limit configuration)

Vendor Advisory: https://exim.org/static/doc/security/EXIM-Security-2025-12-09.1/report.txt

Restart Required: No

Instructions:

1. Download latest Exim release from exim.org. 2. Backup current configuration. 3. Compile and install new version. 4. Verify configuration compatibility. 5. For rate-limit configurations, ensure update to 4.99.1.

🔧 Temporary Workarounds

Disable vulnerable features

all

Temporarily disable SQLite hints and ETRN serialization if not required

Edit Exim configuration to remove or comment out SQLite hint and ETRN serialization directives

🧯 If You Can't Patch

  • Implement strict network access controls to limit Exim service exposure
  • Monitor SQLite database access patterns and query logs for anomalies

🔍 How to Verify

Check if Vulnerable:

Check Exim version with 'exim --version' and verify if SQLite hints and ETRN serialization are enabled in configuration

Check Version:

exim --version | head -1

Verify Fix Applied:

Confirm version is 4.98.1 or higher with 'exim --version' and test SQL injection attempts are properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in Exim logs
  • ETRN commands with SQL-like syntax
  • Database error messages in mail logs

Network Indicators:

  • ETRN commands containing SQL metacharacters
  • Unusual database connection patterns from Exim process

SIEM Query:

source="exim.log" AND ("SQL" OR "database error" OR "ETRN")

🔗 References

📤 Share & Export