Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-26794

CVE-2025-26794: Exim Mail Server SQLi Vulnerability

CVE-2025-26794 is a SQL injection vulnerability in Exim mail server affecting versions before 4.98.1. Attackers can exploit SQLite hints and ETRN serialization to execute malicious SQL queries remotely.

Updated:

CVE-2025-26794 Overview

CVE-2025-26794 is a critical SQL injection vulnerability affecting Exim mail transfer agent version 4.98 before 4.98.1. When SQLite hints and ETRN serialization features are enabled, the vulnerability allows remote attackers to perform SQL injection attacks against the underlying database. The vulnerability requires an update to version 4.99.1 in certain non-default rate-limit configurations to fully resolve the SQL injection risk.

Critical Impact

This vulnerability allows unauthenticated remote attackers to inject arbitrary SQL commands through the network, potentially leading to complete compromise of confidentiality, integrity, and availability of the affected mail server and its data.

Affected Products

  • Exim versions 4.98 before 4.98.1
  • Exim installations using SQLite hints feature
  • Exim configurations with ETRN serialization enabled

Discovery Timeline

  • February 21, 2025 - CVE-2025-26794 published to NVD
  • December 18, 2025 - Last updated in NVD database

Technical Details for CVE-2025-26794

Vulnerability Analysis

This SQL injection vulnerability (CWE-89) exists in Exim's handling of SQLite hints combined with ETRN serialization functionality. The vulnerability enables remote attackers to manipulate SQL queries executed by the mail server without requiring authentication. When exploited, attackers can potentially read, modify, or delete database contents, execute administrative operations, and in some cases, issue commands to the operating system.

The attack surface is exposed over the network, requiring no privileges or user interaction. Successful exploitation can result in complete compromise of the mail server's data confidentiality through unauthorized data access, data integrity through malicious modifications, and system availability through destructive queries or resource exhaustion.

Root Cause

The root cause is improper neutralization of special elements used in SQL commands (CWE-89). User-supplied input processed through the SQLite hints and ETRN serialization code paths is not properly sanitized before being incorporated into SQL queries. This allows attackers to break out of the intended query structure and inject malicious SQL statements.

Attack Vector

The attack is conducted remotely over the network against Exim servers running vulnerable configurations. An attacker can craft malicious SMTP requests that, when processed by the ETRN serialization feature with SQLite hints enabled, inject arbitrary SQL commands. The attack requires no authentication and no user interaction, making it highly exploitable in exposed environments.

The vulnerability specifically targets the interplay between SQLite database operations and the ETRN (Extended Turn) command serialization mechanism, where input validation failures allow SQL metacharacters to pass through unchecked.

Detection Methods for CVE-2025-26794

Indicators of Compromise

  • Unusual SQL error messages in Exim log files indicating malformed queries
  • Unexpected database modifications or data extraction patterns in SQLite hint databases
  • Anomalous ETRN command activity from external sources
  • Signs of data exfiltration or unauthorized administrative actions on the mail server

Detection Strategies

  • Monitor Exim logs for SQL-related error messages or unusual query patterns
  • Implement network intrusion detection rules for malformed SMTP commands targeting ETRN functionality
  • Deploy database activity monitoring on SQLite databases used by Exim
  • Use web application firewall rules to detect SQL injection patterns in mail traffic

Monitoring Recommendations

  • Enable verbose logging for Exim SMTP transactions and database operations
  • Configure alerts for repeated failed SQL operations or syntax errors
  • Monitor for unusual ETRN command usage patterns from external IP addresses
  • Track database file access and modification times for SQLite hint databases

How to Mitigate CVE-2025-26794

Immediate Actions Required

  • Update Exim to version 4.98.1 or later immediately
  • For non-default rate-limit configurations, update to version 4.99.1
  • Review Exim configuration to identify if SQLite hints and ETRN serialization are enabled
  • Consider temporarily disabling ETRN serialization if patching cannot be performed immediately

Patch Information

The Exim development team has released security patches addressing this vulnerability. The primary fix is available in Exim 4.98.1, with additional fixes for certain rate-limit configurations in version 4.99.1. The patch addresses the SQL injection by properly sanitizing input before database operations.

The fix can be reviewed in the Exim Commit bfe32b5. The official security advisory is available at the Exim CVE-2025-26794 Report. Additional security information is maintained on the GitHub Exim Security Wiki.

Operating system vendors have begun distributing patched packages:

Workarounds

  • Disable SQLite hints feature if not required for operations
  • Disable ETRN serialization functionality until patching is complete
  • Implement network-level access controls to limit SMTP access to trusted sources
  • Deploy application-layer filtering to block potential SQL injection payloads
text
# OpenBSD ports patch updating Exim to 4.98.1
# Source: https://github.com/openbsd/ports/commit/584d2c49addce9ca0ae67882cc16969104d7f82d

 COMMENT-main =		flexible mail transfer agent
 COMMENT-eximon =	X11 monitor tool for Exim MTA
 
-VERSION =		4.98
+VERSION =		4.98.1
 DISTNAME =		exim-${VERSION}
 PKGNAME-main =		exim-${VERSION}
 FULLPKGNAME-eximon =	exim-eximon-${VERSION}
 FULLPKGPATH-eximon =	${PKGPATH},-eximon
 
-REVISION =		0
-
 CATEGORIES =		mail
 
 HOMEPAGE =		https://www.exim.org/

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.