CVE-2024-23185: Dovecot CVE-2024-23185: Very large headers can cause source exhaustion when parsing message

Published Aug 15, 2024
·
Updated

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

8 affected componentsFixes available
alpine/dovecot<2.3.21.1-r0
2.3.21.1-r0
alpine/dovecot<2.3.21.1-r0
2.3.21.1-r0
alpine/dovecot<2.3.21.1-r0
2.3.21.1-r0
alpine/dovecot<2.3.21.1-r0
2.3.21.1-r0
debian/dovecot<1:2.3.19.1+dfsg1-2.1+deb12u1
1:2.3.19.1+dfsg1-2.1+deb12u1
debian/dovecot<1:2.3.21.1+dfsg1-1
1:2.3.21.1+dfsg1-1
debian/dovecot<1:2.3.21.1+dfsg1-1
1:2.3.21.1+dfsg1-1
debian/dovecot
1:2.3.19.1+dfsg1-2.1+deb12u61:2.3.19.1+dfsg1-2.1+deb12u71:2.4.1+dfsg1-6+deb13u61:2.4.1+dfsg1-6+deb13u71:2.4.5+dfsg1-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/dovecot to a version that resolves this vulnerability.

    Fixed in 2.3.21.1-r0
  2. Upgrade

    Upgrade debian/dovecot to a version that resolves this vulnerability.

    Fixed in 1:2.3.19.1+dfsg1-2.1+deb12u1
  3. Upgrade

    Upgrade debian/dovecot to a version that resolves this vulnerability.

    Fixed in 1:2.3.21.1+dfsg1-1
  4. Upgrade

    Upgrade debian/dovecot to a version that resolves this vulnerability.

    Fixed in 1:2.3.19.1+dfsg1-2.1+deb12u6Fixed in 1:2.3.19.1+dfsg1-2.1+deb12u7Fixed in 1:2.4.1+dfsg1-6+deb13u6Fixed in 1:2.4.1+dfsg1-6+deb13u7Fixed in 1:2.4.5+dfsg1-4
  5. Compensating control

    Implement restrictions on message headers in the MTA component preceding Dovecot to limit excessively large headers.

Event History

Aug 19, 2024
Data Sourced
via Red Hat·08:47 PM
DescriptionSeverityAffected Software
Sep 10, 2024
CVE Published
via MITRE·02:38 PM
Data Sourced
via MITRE·02:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-23185?

CVE-2024-23185 has a medium severity rating due to its potential for causing resource exhaustion.

2

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.

3

What causes CVE-2024-23185?

CVE-2024-23185 is caused by very large headers leading to resource exhaustion during message parsing.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203