ZeroHour

CVE-2026-67445

large

Unbounded SMTP command-line buffering enables remote DoS in Mailpit

CVSS 3.1
5.3 medium
EPSS
<1%p31
Published
()
Modified
AI analysis

Mailpit's SMTP server, which is enabled by default and binds to all interfaces on port 1025, reads every SMTP command line with an unbounded buffered read before it parses the verb or enforces any length limit, so a client can make the server buffer a line of arbitrary size before the syntax error or read timeout kicks in (RFC 5321 caps command lines at 512 octets). An attacker with network access to the SMTP port can send a single grossly oversized command line (the advisory's test uses 8 MiB) to drive attacker-controlled memory allocation in the server, yielding an availability-only impact (CVSS 7.5, CWE-400), i.e., denial of service through memory exhaustion. Existing protections do not help here: recipient-address validation runs only after the line is fully buffered, and the 50 MiB default MaxMessageSize limit applies to the DATA phase, not to command input. Anyone running Mailpit with its SMTP listener reachable by untrusted clients is affected, including default all-interfaces deployments on shared dev servers, published Docker ports, and CI; strictly localhost-only desktop use is largely unaffected. No public PoC or in-the-wild exploitation is known; EPSS is about 0.4% (31st percentile) and the CVE is not in CISA KEV.

What to do: Upgrade to the latest Mailpit release as soon as a fix for the unbounded SMTP command-line read is published, since the available data does not name a patched version. Until then, restrict untrusted reachability of TCP 1025 (bind to localhost, firewall rules, or Docker network policy) and check whether any shared or containerized Mailpit instances expose the SMTP listener beyond trusted networks; no in-product command-line length workaround is documented.

Affected
Mailpit (axllent/mailpit) Mailpit
Estimated exposure
largeorder of 10^5 developer installations plausibly affected, with only a subset (network-exposed instances) practically reachable — No install counts were provided; the estimate rests on Mailpit's deployment pattern as a widely adopted Go/PHP developer email-testing tool whose default SMTP listener binds all interfaces ([::]:1025), while most instances run on…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Mailpit is an email testing tool and API for developers. Prior to 1.30.4, Mailpit reads SMTP commands through internal/smtpd/smtpd.go session.readLine() using bufio.Reader.ReadString before session.parseLine() parses the verb or the RFC 5321 512-octet command-line limit is enforced. An unauthenticated remote SMTP client can send an oversized single command line that is fully allocated before syntax rejection or timeout, and the normal MaxMessageSize and DATA limits do not apply to this pre-DATA path. The same command reader is used by handleAuthLogin(), handleAuthPlain(), and handleAuthCramMD5() continuation lines, so concurrent oversized inputs can create memory pressure and reduce service availability. This issue is fixed in version 1.30.4.

Ecosystems
go
Weakness
CWE-400
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GHSA
GHSA-w878-pj84-3j5v (high)

In the news

No ingested article mentions this CVE yet.