CVE-2026-45185 "Dead.Letter": Exim use-after-free in BDAT/CHUNKING on GnuTLS builds, fixed in 4.99.3
Exim 4.99.3 fixes an unauthenticated use-after-free in BDAT handling on GnuTLS builds (CVE-2026-45185)
Analysis
The Exim maintainers published EXIM-Security-2026-05-01.1 (CVE-2026-45185, Critical, CVSS 9.8) on 2026-05-12 after a report from Federico Kirschbaum of XBOW on 2026-05-01: when a client sends a TLS close_notify alert before a BDAT body transfer is complete and follows it with a final byte in cleartext on the same TCP connection, Exim writes into a buffer already freed during the TLS teardown and corrupts the heap, and an attacker only needs to establish a TLS connection and use the CHUNKING (BDAT) extension (Exim advisory, 2026-05-12). Exim 4.97 up to and including 4.99.2 built with USE_GNUTLS=yes are affected, OpenSSL builds are not, and 4.99.3 fixes the flaw by resetting the input-processing stack when a TLS close notification arrives during a BDAT transfer; there is no known mitigation other than upgrading (Exim advisory, 2026-05-12). XBOW's write-up places the freed memory in Exim's TLS transfer buffer, into which the still-active BDAT receive wrapper's call to ungetc() writes a single newline, and notes that GnuTLS is the default TLS library on many Debian-based distributions, including Ubuntu (XBOW, 2026-05-12). During the disclosure window an LLM guided step by step by XBOW Native produced working exploits against non-PIE builds, first without ASLR and then with ASLR, the latter running its payload through Exim's ${run} expansion, which forks bash; against the default PIE build no full exploit was reported: the researcher's side got as far as leaking a stack address, while the LLM never got as far as a leak (XBOW, 2026-05-12).
Cited evidence
An attacker only needs to be able to establish a TLS connection and use the CHUNKING (BDAT) SMTP extension.
This vulnerability only impacts builds that use USE_GNUTLS=yes. Builds using OpenSSL or other TLS libraries are not affected.
There is no known mitigation other than upgrading.
the default TLS library on many Debian-based distributions, including Ubuntu
XBOW Native had cracked the second challenge, ASLR on, still no-PIE.
The LLM kept working for a while longer and never even got as far as a leak.
Updates1
The LLM-built exploits covered non-PIE builds only, first without ASLR and then with ASLR; against the default PIE build the researcher's side got as far as leaking a stack address and the LLM never reached a leak, so no full exploit was reported (XBOW, 2026-05-12). The Exim maintainers state there is no known mitigation other than upgrading, so suppressing the CHUNKING advertisement is not a vendor-endorsed workaround, and their advisory, not XBOW's post, sets the CVSS 9.8 and the affected range of 4.97 up to and including 4.99.2 on builds using GnuTLS, fixed in 4.99.3 (Exim advisory, 2026-05-12). Exposure further requires STARTTLS and CHUNKING to be advertised (oss-security, 2026-05-12).
Sources4
Revision history
- Published 2026-05-13-c148b9a5
- Correction 2026-10-21T1148Z-audit
The exploits produced with an LLM during the disclosure window worked only against non-PIE builds, first without and then with ASLR; against the default PIE build no full exploit was reported, the researcher's side getting as far as a leaked stack address. The Exim maintainers know no mitigation other than upgrading to 4.99.3, so disabling CHUNKING advertisement is not a vendor workaround, and the advisory sets the CVSS 9.8 and the affected range of 4.97 to 4.99.2 on builds with GnuTLS.
Changed: affected_products body classification cves evidence headline sources sourcing_note summary techniques title
AI-generated · no human review · this permalink is the shareable record for the finding · verify operationally critical claims against the linked primary source.