CVE-2026-67446
moderateMailpit thumbnail API decodes unbounded images, enabling memory-exhaustion DoS
Mailpit's thumbnail endpoint (GET /api/v1/message/{id}/part/{partID}/thumb) decodes attacker-supplied image attachments into a full raster before any dimension, pixel-count, or memory check, so a small encoded image can expand to tens or hundreds of MiB of decoded pixels before being scaled to a fixed 180x120 thumbnail. A remote client that can store a message and reach the web API can trigger the decode directly, and the web UI automatically requests these thumbnails via <img src> when a message with image attachments is opened. The result is a memory/CPU amplification denial of service: per the proof-of-value, a ~65 KB PNG decodes to ~64 MiB of RGBA data before scaling, and concurrent requests can exhaust host resources with availability impact only (no confidentiality or integrity loss). Any deployment running Mailpit with the API/UI reachable by untrusted clients is affected, including internet-exposed instances and shared dev/CI mail-catchers, while localhost-only installs are minimally exposed. Exploitation is not currently observed: EPSS is 0.4%, the flaw is not in CISA KEV, and no public PoC is known.
What to do: Upgrade Mailpit to the patched release once the vendor publishes it (no fixed version number is given in the available data) and verify the fix bounds decoded image dimensions/pixels before scaling. Until then, restrict the web UI/API to trusted networks or authenticated users, avoid exposing Mailpit directly to the internet, and limit untrusted message attachments or request rates. Note that the web UI auto-fetches thumbnails for image attachments, so even authenticated viewers of attacker-sent messages can trigger the amplification.
| axllent Mailpit | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Mailpit is an email testing tool and API for developers. Prior to 1.30.4, Mailpit decodes attacker-supplied image attachments into a full raster before checking decoded dimensions, pixel count, or memory use in the GET /api/v1/message/{id}/part/{partID}/thumb endpoint. The Thumbnail handler in server/apiv1/thumbnails.go obtains attachment bytes through storage.GetAttachmentPart(), accepts image/* content, and calls imaging.Decode() with AutoOrientation before imaging.Fill() scales the image to 180 by 120 pixels. A compact image declaring very large dimensions can therefore consume disproportionately large memory and CPU, and opening the message UI can trigger the same endpoint through server/ui-src/components/message/MessageAttachments.vue. This can degrade availability when an unauthenticated client can store the crafted attachment and reach the web API. This issue is fixed in version 1.30.4.
- Ecosystems
- go
- Weakness
- CWE-400, CWE-770
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- GHSA
- GHSA-75mr-qw9x-3r39 (high)
In the news0 stories
No ingested article mentions this CVE yet.