Mailpit is vulnerable to Cross-Site WebSocket Hijacking (CSWSH) allowing unauthenticated access to emails
Description
Mailpit is an email testing tool and API for developers. Prior to version 1.28.2, the Mailpit WebSocket server is configured to accept connections from any origin. This lack of Origin header validation introduces a Cross-Site WebSocket Hijacking (CSWSH) vulnerability. An attacker can host a malicious website that, when visited by a developer running Mailpit locally, establishes a WebSocket connection to the victim's Mailpit instance (default ws://localhost:8025). This allows the attacker to intercept sensitive data such as email contents, headers, and server statistics in real-time. This issue has been patched in version 1.28.2.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/axllent/mailpitGo | >= 1.2.6, < 1.28.2 | 1.28.2 |
github.com/axllent/mailpitGo | < 0.0.0-20260110031614 | 0.0.0-20260110031614 |
Affected products
1Patches
16f1f4f34c989Security: Prevent Cross-Site WebSocket Hijacking (CSWSH) allowing unauthenticated access to message data [CVE-2026-22689](https://github.com/axllent/mailpit/security/advisories/GHSA-524m-q5m7-79mm)
1 file changed · +1 −2
server/websockets/client.go+1 −2 modified@@ -34,8 +34,7 @@ var ( var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, - CheckOrigin: func(r *http.Request) bool { return true }, // allow multi-domain - EnableCompression: true, // experimental compression + EnableCompression: true, } // Client is a middleman between the websocket connection and the hub.
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-524m-q5m7-79mmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-22689ghsaADVISORY
- github.com/axllent/mailpit/commit/6f1f4f34c98989fd873261018fb73830b30aec3fghsax_refsource_MISCWEB
- github.com/axllent/mailpit/security/advisories/GHSA-524m-q5m7-79mmghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.