Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-22689

CVE-2026-22689: Mailpit WebSocket Hijacking Vulnerability

CVE-2026-22689 is a Cross-Site WebSocket Hijacking flaw in Mailpit that allows attackers to intercept emails and sensitive data via malicious websites. This article covers technical details, affected versions, and patches.

Updated: January 22, 2026

CVE-2026-22689 Overview

A Cross-Site WebSocket Hijacking (CSWSH) vulnerability has been identified in Mailpit, a popular email testing tool and API used by developers. Prior to version 1.28.2, the Mailpit WebSocket server is configured to accept connections from any origin due to a lack of Origin header validation. This vulnerability allows an attacker to 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). Through this attack vector, sensitive data such as email contents, headers, and server statistics can be intercepted in real-time.

Critical Impact

Attackers can intercept sensitive email data including contents, headers, and server statistics from developers running Mailpit locally by exploiting the permissive WebSocket origin policy.

Affected Products

  • Mailpit versions prior to 1.28.2
  • Developer environments running Mailpit on default configuration (localhost:8025)
  • Any deployment where Mailpit WebSocket interface is accessible without Origin validation

Discovery Timeline

  • January 10, 2026 - CVE-2026-22689 published to NVD
  • January 13, 2026 - Last updated in NVD database

Technical Details for CVE-2026-22689

Vulnerability Analysis

This vulnerability stems from improper WebSocket configuration in Mailpit's server implementation. The WebSocket upgrader was explicitly configured to bypass origin checking, accepting connections from any domain. This is a classic Cross-Site WebSocket Hijacking (CSWSH) vulnerability pattern (CWE-1385) that allows malicious websites to establish WebSocket connections to a victim's local Mailpit instance.

When a developer visits an attacker-controlled website while running Mailpit locally, the malicious page can initiate a WebSocket connection to ws://localhost:8025. Because the server accepts all origins, this connection is established successfully. The attacker's JavaScript can then receive all real-time data pushed through the WebSocket, including email contents, headers, and server statistics meant only for the legitimate local user.

Root Cause

The root cause is the permissive CheckOrigin function in the WebSocket upgrader configuration. The server was explicitly configured with CheckOrigin: func(r *http.Request) bool { return true }, which unconditionally accepts WebSocket upgrade requests regardless of the Origin header. This design choice, likely intended to support multi-domain development scenarios, inadvertently created a significant security vulnerability by disabling a critical security control.

Attack Vector

The attack requires user interaction—specifically, a developer must visit a malicious website while running Mailpit locally. The attack flow involves:

  1. Attacker hosts a malicious website containing JavaScript that attempts WebSocket connections to common localhost ports
  2. Developer visits the malicious site while Mailpit is running locally
  3. The malicious JavaScript establishes a WebSocket connection to ws://localhost:8025
  4. Without origin validation, Mailpit accepts the connection
  5. Attacker's script receives all real-time email data and server statistics

The following code shows the vulnerable configuration and the security patch applied:

go
 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.

Source: GitHub Commit Details

Detection Methods for CVE-2026-22689

Indicators of Compromise

  • Unexpected WebSocket connections to Mailpit from non-localhost origins
  • Browser developer console showing WebSocket connections initiated from unfamiliar domains to localhost:8025
  • Network traffic logs indicating cross-origin WebSocket upgrade requests to Mailpit endpoints
  • Unexplained access patterns or data exfiltration from local development environments

Detection Strategies

  • Monitor WebSocket connection logs for connections originating from external or unexpected origins
  • Implement browser extensions or network monitoring tools to alert on localhost WebSocket connections from external sites
  • Review Mailpit access logs for suspicious connection patterns or high-frequency data access
  • Use Content Security Policy (CSP) headers in development environments to restrict WebSocket connections

Monitoring Recommendations

  • Enable verbose logging on Mailpit instances to track WebSocket connection origins
  • Implement network-level monitoring for unexpected localhost traffic patterns in development environments
  • Regularly audit development tool configurations for overly permissive security settings
  • Consider using endpoint detection solutions that can identify anomalous localhost communication patterns

How to Mitigate CVE-2026-22689

Immediate Actions Required

  • Upgrade Mailpit to version 1.28.2 or later immediately
  • Audit any custom WebSocket configurations for similar permissive origin policies
  • Review browser history and network logs for signs of exploitation if running vulnerable versions
  • Consider temporarily disabling Mailpit's WebSocket functionality until patched

Patch Information

This vulnerability has been patched in Mailpit version 1.28.2. The fix removes the permissive CheckOrigin function that unconditionally returned true, defaulting to the standard origin checking behavior which validates that the WebSocket connection originates from an allowed origin. The patch is available in commit 6f1f4f34c98989fd873261018fb73830b30aec3f. For detailed information, refer to the GitHub Security Advisory GHSA-524m-q5m7-79mm.

Workarounds

  • Restrict network access to Mailpit by binding it to localhost only and ensuring no external network access
  • Use a reverse proxy with proper origin validation in front of Mailpit's WebSocket endpoint
  • Implement firewall rules to block external connections to Mailpit ports
  • Consider running Mailpit in an isolated Docker container without host network access
bash
# Configuration example - Run Mailpit with restricted binding
# Ensure Mailpit only listens on localhost interface
mailpit --listen 127.0.0.1:8025

# Alternatively, use Docker with isolated networking
docker run -d --name mailpit -p 127.0.0.1:8025:8025 axllent/mailpit:v1.28.2

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechMailpit

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-1385
  • Technical References
  • GitHub Commit Details

  • GitHub Security Advisory GHSA-524m-q5m7-79mm
  • Related CVEs
  • CVE-2026-23829: Mailpit SMTP Header Injection Vulnerability

  • CVE-2026-27808: Mailpit Link Check API SSRF Vulnerability

  • CVE-2026-23845: Mailpit SSRF Vulnerability

  • CVE-2026-21859: Mailpit Email Testing Tool SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English