What’s Vulnerable › Vulnerabilities
CVE-2026-23829: Mailpit has SMTP Header Injection via Regex Bypass
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-01-19 · updated 2026-06-17
- Weakness: CWE-93
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.
Affected products
- axllent mailpit: before 1.28.3 — fixed in 1.28.3
How to fix
Upgrade to a fixed version: axllent mailpit 1.28.3. Check the vendor advisory for mitigations.
References
- https://github.com/axllent/mailpit/commit/36cc06c125954dec6673219dafa084e13cc14534
- https://github.com/axllent/mailpit/releases/tag/v1.28.3
- https://github.com/axllent/mailpit/security/advisories/GHSA-54wq-72mp-cq7c
Get alerted when CVE-2026-23829 or the next vulnerability affects your stack