highCVSS 7.5Vulnerability

CVE-2026-67445

## Summary Mailpit's SMTP server reads each command line with an unbounded `bufio.Reader.ReadString('\n')` before parsing the command or enforcing any protocol length limit. A remote SMTP client can send an oversized single command line and force Mailpit to allocate attacker-controlled memory before the server returns a syntax error or times out, even though RFC 5321 limits SMTP command lines to 512 octets including CRLF. ## Technical Details Mailpit enables SMTP by default. `config/config.go` sets `SMTPListen = "[::]:1025"`, and `cmd/root.go` calls `smtpd.Listen()` during normal startup. The SMTP server configures recipient and message DATA size limits in `internal/smtpd/main.go`, including the default 50 MiB `MaxMessageSize`, but those limits do not apply to command lines. The vulnerable path is in the SMTP command loop. `internal/smtpd/smtpd.go` calls `s.readLine()` for every command before parsing the verb or arguments: ```go line, err := s.readLine() if err != nil { if netErr, ok := err.(net.Error); ok && netErr.Timeout() { s.writef("421 4.4.2 %s %s ESMTP Service closing transmission channel after timeout exceeded", s.srv.Hostname, s.srv.AppName) } break } verb, args := s.parseLine(line) ``` `readLine()` then buffers until newline without a maximum length: ```go func (s *session) readLine() (string, error) { if s.srv.Timeout > 0 { _ = s.conn.SetReadDeadline(time.Now().Add(s.srv.Timeout)) } line, err := s.br.ReadString('\n') if err != nil { return "", err } line = strings.TrimSpace(line) return line, err } ``` This violates the SMTP command-line invariant before later validation can help. Address length validation in `extractAndValidateAddress()` runs only after the entire command line has already been buffered and parsed. The DATA reader has a separate `srv.MaxSize` check, but the issue is pre-DATA command input. ## PoV The following bounded test exercises the same command reader with a

Properties

severity
high
summary
Mailpit: SMTP command parser buffers unbounded command lines before syntax rejection
epss_score
0.00379
cvss_score
7.5
ghsa_published
2026-09-02T23:42:25Z
source_url
https://github.com/advisories/GHSA-w878-pj84-3j5v
ghsa_updated
2026-09-02T23:42:25Z
ghsa_id
GHSA-w878-pj84-3j5v
cve_id
CVE-2026-67445
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
is_ghsa_only
false
epss_percentile
0.3096

Related Entities (5)

ENRICHED_BY (1)

[Source]FIRST EPSS

VULNERABLE_TO (1)

[Software]go/github.com/axllent/mailpit

AFFECTS (1)

[Software]go/github.com/axllent/mailpit

HAS_WEAKNESS (1)

[Weakness]Uncontrolled Resource Consumption

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-67445 (CVSS 7.5) — Ninja Signal Threat Intelligence | Ninja Signal