Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.

Dovecot mail server can use excess memory with huge headers

published 2 years ago
Summary

All versions of Dovecot can consume a lot of memory when processing email messages that contain extremely long header lines. This can slow down or even stop the mail service, especially if a user uploads a message with oversized headers. Limit the size of headers on the mail server that receives messages before they reach Dovecot, and apply any available updates from the vendor.

What to do

The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.

Affected software
Ecosystem VendorProductAffected versions
Azure Linux:3 azure dovecot <= 2.3.20-1
Original advisory text
CVE-2024-23185 affecting package dovecot 2.3.20-1
Very large headers can cause resource exhaustion when parsing message. The message-parser normally reads reasonably sized chunks of the message. However, when it feeds them to message-header-parser, it starts building up "full_value" buffer out of the smaller chunks. The full_value buffer has no size limit, so large headers can cause large memory usage. It doesn't matter whether it's a single long header line, or a single header split into multiple lines. This bug exists in all Dovecot versions. Incoming mails typically have some size limits set by MTA, so even largest possible header size may still fit into Dovecot's vsz_limit. So attackers probably can't DoS a victim user this way. A user could APPEND larger mails though, allowing them to DoS themselves (although maybe cause some memory issues for the backend in general). One can implement restrictions on headers on MTA component preceding Dovecot. No publicly available exploits are known.
Timeline
Published10 Sep 2024
Updated23 Sep 2026
First seen23 Sep 2026
Sources
AZL-49027 · OSV
Track software like this
Free during beta