Executive brief
Mailpit is a tool used by developers to test email functionality by capturing and viewing outgoing emails in a local environment. A security flaw allows an unauthenticated attacker to send specially crafted requests that consume excessive amounts of server memory. This can lead to the tool crashing or becoming unresponsive, disrupting development and testing workflows.
Technical details
Mailpit fails to enforce request body size limits on four JSON API endpoints: PUT /api/v1/messages, DELETE /api/v1/messages, PUT /api/v1/tags, and POST /api/v1/message/{id}/release. While a previous fix (CVE-2026-45710) addressed this for the send endpoint using http.MaxBytesReader, these sibling endpoints still call json.NewDecoder(r.Body) directly. An unauthenticated attacker can provide a multi-million-element 'IDs' slice in a JSON body, causing significant memory amplification (approximately 28x the payload size) as the Go decoder materializes each element. This leads to Resident Set Size (RSS) growth that can trigger Out-Of-Memory (OOM) kills. The vulnerability is patched in version 1.30.1.
Affected products
- axllent Mailpit <= 1.30.0
Timeline
- 2026-05-28: patched: Version 1.30.1 released
- 2026-07-20: disclosed: CVE-2026-48824 published