Skip to main content
Vulnerability Database/CVE-2026-57228

CVE-2026-57228: Suricata SMTP MIME Buffer Overflow Flaw

CVE-2026-57228 is a buffer overflow in Suricata network security engine affecting SMTP MIME quoted-printable decoding. Crafted traffic can crash the system. This article covers technical details, affected versions, and fixes.

Published:

CVE-2026-57228 Overview

CVE-2026-57228 is an out-of-bounds read vulnerability in the Suricata network Intrusion Detection and Prevention System. The flaw resides in the SMTP MIME quoted-printable decoder implemented in src/util-decode-mime.c. Affected versions from 7.0.13 through 7.0.16 read one byte past a heap buffer when a quoted-printable escape sequence is split across traffic chunks and the subsequent chunk contains exactly one byte. Crafted SMTP traffic can trigger the out-of-bounds read and crash the Suricata process when decode-quoted-printable MIME decoding is enabled. The issue is fixed in Suricata 7.0.17.

Critical Impact

Remote attackers can crash Suricata sensors by sending crafted SMTP traffic, disabling network intrusion detection and prevention capabilities without authentication.

Affected Products

  • Suricata 7.0.13
  • Suricata 7.0.14 through 7.0.16
  • Deployments with decode-quoted-printable MIME decoding enabled

Discovery Timeline

  • 2026-09-18 - CVE-2026-57228 published to the National Vulnerability Database (NVD)
  • 2026-09-23 - Last updated in NVD database

Technical Details for CVE-2026-57228

Vulnerability Analysis

The vulnerability is classified as an out-of-bounds read [CWE-125] in Suricata's MIME decoding subsystem. Suricata processes network traffic in discrete chunks as packets are reassembled. The SMTP MIME quoted-printable decoder maintains state across these chunks through the bvremain buffer. When an escape sequence begins with = at the end of one chunk, the decoder continues parsing when the next chunk arrives.

If the following chunk contains exactly one byte and the decoder has already stored the = character but not the first hexadecimal digit, the code reads a second byte past the end of the one-byte buffer. This heap buffer overread causes Suricata to crash, resulting in loss of network monitoring and intrusion prevention coverage.

Root Cause

The root cause is missing bounds validation in the escape-sequence continuation logic within DecodeMIMEChunk. The decoder assumes that at least two bytes remain available when resuming an escape sequence, but does not verify the remaining counter before dereferencing buf + offset + 1.

Attack Vector

Exploitation requires no authentication. An attacker sends crafted SMTP traffic containing a quoted-printable encoded MIME part where a =XX escape sequence is deliberately split so that the second chunk carries exactly one byte. When Suricata reassembles the stream and invokes the MIME decoder with decode-quoted-printable enabled, the out-of-bounds read is triggered.

c
     offset = 0;
     if (state->bvr_len > 0 && state->bvremain[0] == '=') {
         // we were escaping
+        if (remaining == 0) {
+            return MIME_DEC_OK;
+        }
         if (state->bvr_len > 1) {
             h1 = state->bvremain[1];
             h2 = *(buf + offset);
         } else {
             h1 = *(buf + offset);
+            if (remaining == 1) {
+                state->bvremain[1] = h1;
+                state->bvr_len++;
+                return MIME_DEC_OK;
+            }
             h2 = *(buf + offset + 1);
         }
         res = DecodeQPChar(h1);

Source: Suricata patch commit 19880f9. The patch adds early returns when remaining is 0 or 1, deferring escape-sequence processing until sufficient data arrives.

Detection Methods for CVE-2026-57228

Indicators of Compromise

  • Unexpected Suricata process termination or repeated restarts, particularly on sensors monitoring SMTP traffic
  • Segmentation fault entries in system logs referencing the suricata binary
  • Crash dumps or core files containing stack frames from util-decode-mime.c and DecodeMIMEChunk
  • SMTP sessions containing malformed quoted-printable content with escape sequences at chunk boundaries

Detection Strategies

  • Monitor Suricata process uptime and restart counts through host telemetry to identify abnormal termination patterns
  • Inspect SMTP flow reassembly logs for MIME parts with truncated quoted-printable escape sequences (= followed by insufficient hex digits)
  • Correlate sensor outages with SMTP traffic spikes from external or untrusted networks

Monitoring Recommendations

  • Alert when Suricata daemons exit unexpectedly on IDS or IPS deployments
  • Track SMTP protocol volume against sensor availability metrics
  • Forward Suricata stats.log and eve.json output to a centralized data lake for correlation with process-health telemetry

How to Mitigate CVE-2026-57228

Immediate Actions Required

  • Upgrade Suricata to version 7.0.17 or later on all sensors running affected releases
  • Inventory deployed Suricata instances and verify installed versions against the affected range 7.0.13 through 7.0.16
  • Prioritize upgrades on sensors that inspect SMTP traffic from untrusted networks

Patch Information

The fix is included in Suricata Release 7.0.17. The corresponding source change is available in the upstream commit 19880f9. Additional details are published in GitHub Security Advisory GHSA-qxm4-q7vx-7xj4 and tracked as OISF Redmine Issue #8608.

Workarounds

  • Disable decode-quoted-printable MIME decoding in suricata.yaml until the upgrade can be deployed
  • Restrict SMTP protocol inspection scope where the decoder is not required for detection use cases
  • Deploy redundant sensors so that a crash on one node does not eliminate monitoring coverage
bash
# suricata.yaml - disable quoted-printable decoding as a temporary workaround
app-layer:
  protocols:
    smtp:
      enabled: yes
      mime:
        decode-mime: yes
        decode-base64: yes
        decode-quoted-printable: no

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.