Executive brief
Mailpit, a tool used by developers to test email functionality, contains a security flaw in its HTML checking feature. An attacker can send a specially crafted email that forces the Mailpit server to make unauthorized requests to internal network services, such as private databases or administrative interfaces. This could allow an attacker to trigger actions on internal systems that are not supposed to be accessible from the outside, potentially disrupting operations or modifying internal configurations.
Technical details
This vulnerability is an incomplete fix for CVE-2026-23845. While previous hardening added size limits and content-type checks to the CSS downloader in 'internal/htmlcheck/css.go', it failed to implement an IP-filtering dialer. The 'newSafeHTTPClient' function lacks IP allowlisting in its 'Transport.DialContext', allowing the server to dial loopback (127.0.0.1), private (RFC1918), and link-local (IMDS) addresses. An attacker can exploit this by sending an HTML email with a stylesheet link pointing to an attacker-controlled server, which then issues a 302 redirect to an internal target. The SSRF is triggered via an unauthenticated GET request to the '/api/v1/message/{id}/html-check' endpoint. This allows for state-changing internal GET requests against local services. The issue is resolved in version 1.30.0.
Affected products
- axllent Mailpit >= 1.28.3, < 1.30.0
Timeline
- 2026-05-14: patched: Version 1.30.0 released with fix
- 2026-07-20: disclosed: CVE-2026-45709 published