CVE-2024-23185
High · 7.5CVSS
7.5
EPSS
1.3%
Published
Sep 10, 2024
CISA due date
—
Cloudanix analysis
A flaw in how the system handles unusually large email headers can use up too much memory and slow down or disrupt the service.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Denial of service
- Remediation
- Workaround Only
- Effort
- Low
- Patch risk
- Other
What it actually does
Unbounded growth of the full_value buffer in the message-header-parser when processing large or multi-line headers from message chunks, leading to excessive memory consumption without size limits.
Why it matters to the business
Potential memory exhaustion affecting service availability; limited real-world impact due to upstream MTA size restrictions, though self-inflicted disruption remains possible via large message appends. Low urgency given absence from known exploited lists and minimal exploit probability trend.
How an attack unfolds
An attacker crafts an email containing oversized single or folded header lines and delivers it to the system, either directly or by inducing a user to append such a message; the parser accumulates header data without bounds until memory pressure occurs. No named threat actors or public exploits are associated.
How to fix it
Upgrade github.com/usememos/memos (Go) to version 0.9.1 or later. Implement header size restrictions on any MTA or preprocessing component before messages reach the parser. Consider enforcing vsz_limit or similar memory caps as an additional control.
How to confirm the fix worked
Confirm the installed version is at least 0.9.1; test by submitting messages with headers exceeding typical MTA limits and monitoring memory usage during parsing; review configuration for any header restriction policies.
Typical attack path
- Craft email with extremely large header values or many folded lines
- Deliver via MTA or direct APPEND operation to the affected component
- Trigger repeated parsing of the oversized headers to accumulate memory usage
- Observe resource exhaustion on the backend service
How to detect it
Inspect mail processing logs for entries showing unusually large header accumulation or memory allocation warnings during parsing; correlate with any user-initiated APPEND operations containing oversized content; no specific actor campaigns known.
What your security team should do
- Apply the 0.9.1 update immediately across all instances
- Add upstream MTA header size limits to prevent oversized messages from reaching the parser
- Monitor memory metrics for unexpected spikes during mail ingestion
- Review and tune any vsz_limit settings to contain potential impact
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | dovecot | 0 | 1:2.3.16-6.el8_10 |
| AlmaLinux:8 | dovecot-devel | 0 | 1:2.3.16-6.el8_10 |
| AlmaLinux:8 | dovecot-mysql | 0 | 1:2.3.16-6.el8_10 |
| AlmaLinux:8 | dovecot-pgsql | 0 | 1:2.3.16-6.el8_10 |
| AlmaLinux:8 | dovecot-pigeonhole | 0 | 1:2.3.16-6.el8_10 |
| AlmaLinux:9 | dovecot | 0 | 1:2.3.16-11.el9_4.1 |
| AlmaLinux:9 | dovecot-devel | 0 | 1:2.3.16-11.el9_4.1 |
| AlmaLinux:9 | dovecot-mysql | 0 | 1:2.3.16-11.el9_4.1 |
| AlmaLinux:9 | dovecot-pgsql | 0 | 1:2.3.16-11.el9_4.1 |
| AlmaLinux:9 | dovecot-pigeonhole | 0 | 1:2.3.16-11.el9_4.1 |
| Alpine:v3.21 | dovecot | 0 | 2.3.21.1-r0 |
| Alpine:v3.22 | dovecot | 0 | 2.3.21.1-r0 |
| Debian:11 | dovecot | 0 | 1:2.3.13+dfsg1-2+deb11u2 |
| Debian:12 | dovecot | 0 | 1:2.3.19.1+dfsg1-2.1+deb12u1 |
| Debian:13 | dovecot | 0 | 1:2.3.21.1+dfsg1-1 |
| Mageia:9 | dovecot | 0 | 2.3.21.1-1.mga9 |
| Red Hat:enterprise_linux:8::appstream | dovecot | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-debugsource | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-devel | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-mysql | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-mysql-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-pgsql | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-pigeonhole | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::appstream | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-debugsource | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-devel | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-mysql | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-mysql-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-pgsql | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-pigeonhole | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:8::crb | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-6.el8_10 |
| Red Hat:enterprise_linux:9::appstream | dovecot | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-debugsource | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-devel | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-mysql | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-mysql-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-pgsql | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-pigeonhole | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::appstream | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-debugsource | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-devel | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-mysql | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-mysql-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-pgsql | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-pigeonhole | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:enterprise_linux:9::crb | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-11.el9_4.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-debugsource | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-devel | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-mysql | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-mysql-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-pgsql | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-pigeonhole | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::appstream | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-debugsource | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-devel | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-mysql | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-mysql-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-pgsql | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-pgsql-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-pigeonhole | 0 | 1:2.3.16-8.el9_2.1 |
| Red Hat:rhel_eus:9.2::crb | dovecot-pigeonhole-debuginfo | 0 | 1:2.3.16-8.el9_2.1 |
| Rocky Linux:8 | dovecot | 0 | 1:2.3.16-6.el8_10 |
| Rocky Linux:9 | dovecot | 0 | 1:2.3.16-11.el9_4.1 |
| SUSE:Enterprise Storage 7.1 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP5 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP6 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Manager Proxy 4.3 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| SUSE:Manager Server 4.3 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| Ubuntu:16.04:LTS | dovecot | 0 | No fix |
| Ubuntu:18.04:LTS | dovecot | 0 | No fix |
| Ubuntu:20.04:LTS | dovecot | 0 | 1:2.3.7.2-1ubuntu3.7 |
| Ubuntu:22.04:LTS | dovecot | 0 | 1:2.3.16+dfsg1-3ubuntu2.4 |
| Ubuntu:24.04:LTS | dovecot | 0 | 1:2.3.21+dfsg1-2ubuntu6 |
| Ubuntu:24.10 | dovecot | 0 | 1:2.3.21.1+dfsg1-1ubuntu1 |
| Ubuntu:25.04 | dovecot | 0 | 1:2.3.21.1+dfsg1-1ubuntu1 |
| Ubuntu:Pro:14.04:LTS | dovecot | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | dovecot | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | dovecot | 0 | No fix |
| openSUSE:Leap 15.5 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| openSUSE:Leap 15.6 | dovecot23 | 0 | 2.3.15-150200.65.1 |
| openSUSE:Tumbleweed | dovecot23 | 0 | 2.3.21.1-1.1 |
| openSUSE:Tumbleweed | dovecot24 | 0 | 2.4.0-1.1 |
Related vulnerabilities
- CVE-2024-23184 Having a large number of address headers (From, To, Cc, Bcc, etc.) becomes excessively… Also affects dovecot
- CVE-2016-8652 The auth component in Dovecot before 2.2.27, when auth-policy is configured, allows a… Also affects dovecot
- CVE-2014-3430 Dovecot 1.1 before 2.2.13 and dovecot-ee before 2.1.7.7 and 2.2.x before 2.2.12.12 does… Also affects dovecot
- CVE-2024-25584 Dovecot accepts dot LF DOT LF symbol as end of DATA command. Also affects dovecot
- CVE-2026-42006 An attacker can cause uncontrolled memory usage with excessive bracing over IMAP. Also affects dovecot24
- CVE-2026-40016 Attacker can upload a malicious Sieve script over ManageSieve service (or locally) to… Also affects dovecot24
- CVE-2026-40020 Attacker can use the IMAP SETACL command to inject the anyone permission to user's… Also affects dovecot24
- CVE-2026-33603 Attacker can use a specially crafted base64 exchange between Dovecot and Client to fake… Also affects dovecot24