Description

Researchers at the National Institute of Standards and Technology (NIST) have discovered critical security flaws in the Exim mail server, which could allow remote attackers to take full control of affected systems. These vulnerabilities impact Exim version 4.99 when configured with SQLite hints databases, potentially exposing thousands of mail servers to compromise. The flaws originate from weaknesses in database handling, and their exploitation could result in severe security consequences for organizations running vulnerable setups. The team identified two separate vulnerabilities. The first is an incomplete fix for CVE-2025-26794, classified as SQL Injection (CWE-89) with a high severity, where single-quote characters are not properly escaped in SQL queries. Attackers can exploit this by sending specially crafted SMTP commands containing malicious email addresses, allowing arbitrary SQL query execution and potential data exfiltration. The second vulnerability is a heap buffer overflow (CWE-122, CWE-787, CWE-843) with critical severity, triggered when unvalidated database fields are used as array boundaries in the bloom filter processing. This can corrupt up to 1.5 megabytes of memory, giving attackers fine-grained control over heap memory and, in some cases, the ability to execute code remotely. Exploitation requires specific configurations, including SQLite support and rate-limited ACLs that process sender-controlled data. While researchers demonstrated memory corruption, modern protections like ASLR have so far prevented full remote code execution. Exim maintainers have been notified, and patches are in progress, including proper single-quote escaping to mitigate SQL injection and validation checks to prevent buffer overflows. Administrators are advised to monitor updates, consider disabling SQLite hint databases temporarily, and restrict ACL configurations using sender addresses until fixes are applied.