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-21859

CVE-2026-21859: Mailpit Email Testing Tool SSRF Vulnerability

CVE-2026-21859 is a Server-Side Request Forgery flaw in Mailpit email testing tool that allows attackers to access internal network resources through the /proxy endpoint. This post covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2026-21859 Overview

CVE-2026-21859 is a Server-Side Request Forgery (SSRF) vulnerability affecting Mailpit, an email testing tool and API for developers. Versions 1.28.0 and below contain a security flaw in the /proxy endpoint that allows attackers to make requests to internal network resources. While the endpoint validates http:// and https:// schemes, it fails to block internal IP addresses, enabling attackers to access internal services and APIs that should be restricted from external access.

Critical Impact

Attackers can leverage the unprotected proxy endpoint to scan internal networks, access sensitive internal services, and potentially exfiltrate confidential data from systems that would otherwise be unreachable from external networks.

Affected Products

  • Mailpit versions 1.28.0 and earlier
  • Mailpit /proxy endpoint implementations
  • Development and staging environments running vulnerable Mailpit instances

Discovery Timeline

  • 2026-01-08 - CVE CVE-2026-21859 published to NVD
  • 2026-01-08 - Last updated in NVD database

Technical Details for CVE-2026-21859

Vulnerability Analysis

This SSRF vulnerability (CWE-918) exists in Mailpit's /proxy endpoint, which is designed to fetch external resources for email rendering functionality. The core issue is insufficient validation of destination URLs—while the endpoint correctly validates that URLs use HTTP or HTTPS schemes, it does not implement IP address filtering to prevent requests to internal network addresses such as 127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16.

The vulnerability is constrained to HTTP GET requests with minimal headers, which limits the attack surface compared to full-featured SSRF vulnerabilities. However, this is still sufficient for attackers to enumerate internal services, access metadata endpoints in cloud environments, and potentially retrieve sensitive configuration data.

Root Cause

The root cause is missing input validation for internal IP addresses in the /proxy endpoint's URL handling logic. The endpoint implements scheme validation to ensure only HTTP and HTTPS protocols are used, but lacks the corresponding validation to block requests to private IP address ranges and localhost. This oversight allows external users to leverage the Mailpit server as a proxy to reach internal network resources.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can craft malicious requests to the /proxy endpoint with URLs targeting internal services. Common attack scenarios include:

  1. Accessing cloud metadata endpoints (e.g., http://169.254.169.254/latest/meta-data/)
  2. Scanning internal networks for open ports and services
  3. Retrieving configuration from internal APIs
  4. Bypassing firewall rules that restrict direct external access

The fix in version 1.28.1 restricts the screenshot proxy to only support asset links contained within the email message itself, preventing arbitrary URL proxying.

text
 	methods: {
 		initScreenshot() {
 			this.loading = 1;
+			const baseUrl = `${location.protocol}//${location.host}/`;
+			// absolute proxy URL
+			const proxy = new URL(this.resolve("/proxy"), baseUrl).href;
+			const urlRegex = /(url\(('|")?(https?:\/\/[^)'"]+)('|")?\))/gim;
+
 			// remove base tag, if set
 			let h = this.message.HTML.replace(/<base .*>/im, "");
-			const proxy = this.resolve("/proxy");
 
 			// Outlook hacks - else screenshot returns blank image
 			h = h.replace(/<html [^>]+>/gim, "<html>"); // remove html attributes
 			h = h.replace(/<o:p><\/o:p>/gm, ""); // remove empty `<o:p></o:p>` tags
 			h = h.replace(/<o:/gm, "<"); // replace `<o:p>` tags with `<p>`
 			h = h.replace(/<\/o:/gm, "</"); // replace `</o:p>` tags with `</p>`
 
-			// update any inline `url(...)` absolute links
-			const urlRegex = /(url\(('|")?(https?:\/\/[^)'"]+)('|")?\))/gim;
-			h = h.replaceAll(urlRegex, (match, p1, p2, p3) => {
-				if (typeof p2 === "string") {
-					return `url(${p2}${proxy}?url=` + encodeURIComponent(this.decodeEntities(p3)) + `${p2})`;
-				}
-				return `url(${proxy}?url=` + encodeURIComponent(this.decodeEntities(p3)) + `)`;
-			});
-
 			// create temporary document to manipulate
 			const doc = document.implementation.createHTMLDocument();
 			doc.open();

Source: GitHub Commit Details

Detection Methods for CVE-2026-21859

Indicators of Compromise

  • Unusual outbound requests from Mailpit server to internal IP ranges (10.x.x.x, 172.16.x.x, 192.168.x.x, 127.0.0.1)
  • High volume of requests to the /proxy endpoint from external sources
  • Requests to cloud metadata endpoints (e.g., 169.254.169.254) originating from Mailpit servers
  • Access logs showing proxy requests to non-standard ports on internal hosts

Detection Strategies

  • Monitor web server access logs for /proxy endpoint requests containing internal IP addresses or localhost
  • Implement network-level monitoring to detect egress traffic from Mailpit servers to internal network segments
  • Configure alerting for requests targeting cloud metadata endpoints from application servers
  • Review firewall logs for unexpected outbound connections originating from Mailpit instances

Monitoring Recommendations

  • Enable verbose logging on Mailpit instances to capture all proxy requests with full URL details
  • Deploy network segmentation monitoring to detect cross-segment traffic from development tool servers
  • Implement web application firewall rules to inspect and block suspicious proxy requests
  • Set up automated scanning to identify Mailpit instances running versions below 1.28.1

How to Mitigate CVE-2026-21859

Immediate Actions Required

  • Upgrade Mailpit to version 1.28.1 or later immediately
  • Restrict network access to Mailpit instances to only authorized users and networks
  • Review access logs for evidence of exploitation attempts against the /proxy endpoint
  • Implement network-level controls to prevent Mailpit servers from accessing internal services

Patch Information

The vulnerability is fixed in Mailpit version 1.28.1. The patch restricts the screenshot proxy functionality to only support asset links that are contained within email messages, preventing arbitrary URL proxying. The fix can be reviewed in the GitHub Commit Details. Additional details are available in the GitHub Security Advisory GHSA-8v65-47jx-7mfr.

Workarounds

  • Place Mailpit behind a reverse proxy that filters requests to the /proxy endpoint
  • Implement firewall rules to prevent outbound connections from Mailpit to internal network ranges
  • Restrict access to Mailpit instances using authentication and IP allowlisting
  • Deploy network segmentation to isolate development tools from production infrastructure
bash
# Example: iptables rules to block Mailpit from accessing internal networks
iptables -A OUTPUT -s <mailpit-server-ip> -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -s <mailpit-server-ip> -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -s <mailpit-server-ip> -d 192.168.0.0/16 -j DROP
iptables -A OUTPUT -s <mailpit-server-ip> -d 127.0.0.0/8 -j DROP
iptables -A OUTPUT -s <mailpit-server-ip> -d 169.254.169.254 -j DROP

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechMailpit

  • SeverityMEDIUM

  • CVSS Score5.8

  • EPSS Probability0.01%

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

  • GitHub Security Advisory GHSA-8v65-47jx-7mfr
  • Related CVEs
  • CVE-2026-27808: Mailpit Link Check API SSRF Vulnerability

  • CVE-2026-23845: Mailpit SSRF Vulnerability

  • CVE-2026-23829: Mailpit SMTP Header Injection Vulnerability

  • CVE-2026-22689: Mailpit WebSocket Hijacking 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