CVE-2024-23185: Dovecot CVE-2024-23185: Very large headers can cause source exhaustion when parsing message
Last updated 16 September 2024
Other sources
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 "fullvalue" buffer out of the smaller chunks. The fullvalue 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 vszlimit. 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.
— NVD
Vulnerability Details: 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 "fullvalue" buffer out of the smaller chunks. The fullvalue 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 vszlimit. 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).
Workaround: One can implement restrictions on headers on MTA component preceding Dovecot.
Fix: Install non-vulnerable version of Dovecot. Patch can be found at https://github.com/dovecot/core/compare/f020e13%5E...ce88c33.patch
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-23185?
CVE-2024-23185 has a medium severity rating due to its potential for causing resource exhaustion.
How do I fix CVE-2024-23185?
To fix CVE-2024-23185, upgrade Dovecot to versions 1:2.3.13+dfsg1-2+deb11u2, 1:2.3.19.1+dfsg1-2.1+deb12u1, or 1:2.3.21.1+dfsg1-1.
What causes CVE-2024-23185?
CVE-2024-23185 is caused by very large headers leading to resource exhaustion during message parsing.
Which software is affected by CVE-2024-23185?
CVE-2024-23185 affects specific versions of the Dovecot mail server, particularly those prior to the secure versions.
Is there a workaround for CVE-2024-23185?
There are no official workarounds for CVE-2024-23185, so upgrading to the patched versions is strongly recommended.