Stalwart Mail Server Denial-of-Service Vulnerability via Malformed Nested MIME Messages

Vulnerability

A denial-of-service vulnerability has been identified in Stalwart Mail Server versions 0.13.0 through 0.15.4. The issue arises when a specially crafted email containing malformed nested 'message/rfc822' MIME parts is accessed via IMAP or JMAP. This malformed structure leads to excessive CPU and memory consumption, potentially causing an out-of-memory condition and server crash. The 'mail-parser' crate used by Stalwart creates cyclical references in its parsed representation of the email, which the server follows indefinitely, exhausting system resources.

Impact

Exploitation of this vulnerability can cause a significant denial-of-service condition, leading to excessive CPU and memory usage that can crash the Stalwart Mail Server. This disruption affects all users of the server.

Reproduction

To reproduce this vulnerability, an attacker must craft an email with malformed nested 'message/rfc822' MIME parts that create cyclical references when parsed. This email is then delivered to a mailbox on a Stalwart server. When an authenticated user accesses the mailbox and requests the body's structure via IMAP or JMAP, the server follows the cyclical references, entering an infinite loop that consumes CPU and memory until the process is terminated or the system runs out of memory.

Remediation

Users are advised to upgrade to Stalwart Mail Server version 0.15.5 or later. For those upgrading from version 0.14.x or earlier, please consult the upgrading documentation for important information about breaking changes.

Added: Feb 19, 2026, 9:35 PM
Updated: Feb 19, 2026, 9:35 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
5.6
remediation
0.0
relevance
3.2
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.