VYPR
Moderate severityOSV Advisory· Published Jan 10, 2026· Updated Jan 12, 2026

Mailpit is vulnerable to Cross-Site WebSocket Hijacking (CSWSH) allowing unauthenticated access to emails

CVE-2026-22689

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.

PackageAffected versionsPatched versions
github.com/axllent/mailpitGo
>= 1.2.6, < 1.28.21.28.2
github.com/axllent/mailpitGo
< 0.0.0-202601100316140.0.0-20260110031614

Affected products

1

Patches

1
6f1f4f34c989

Security: 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)

https://github.com/axllent/mailpitRalph SlootenJan 10, 2026via ghsa
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

News mentions

0

No linked articles in our index yet.