The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-40872

CVE-2026-40872: mailcow dockerized XSS Vulnerability

CVE-2026-40872 is a stored XSS vulnerability in mailcow dockerized that allows attackers to inject malicious scripts through Autodiscover logs. This post explains its impact, affected versions, and mitigation steps.

Published: April 23, 2026

CVE-2026-40872 Overview

CVE-2026-40872 is a critical stored Cross-Site Scripting (XSS) vulnerability in mailcow: dockerized, an open source groupware/email suite based on Docker. In versions prior to 2026-03b, the admin dashboard's Autodiscover logs render the EMailAddress value (logged as the "user" field) without HTML escaping. By submitting an unauthenticated Autodiscover request with a crafted EMailAddress containing HTML/JavaScript, the payload is stored in Redis and executed when an admin views the Autodiscover logs.

Critical Impact

Unauthenticated attackers can inject malicious scripts that execute in the context of an administrator's browser session, potentially leading to full administrative account compromise, data theft, or lateral movement within the mail infrastructure.

Affected Products

  • mailcow: dockerized versions prior to 2026-03b

Discovery Timeline

  • 2026-04-21 - CVE CVE-2026-40872 published to NVD
  • 2026-04-22 - Last updated in NVD database

Technical Details for CVE-2026-40872

Vulnerability Analysis

This stored Cross-Site Scripting vulnerability occurs in the admin dashboard's Autodiscover log viewer component. The Autodiscover protocol is used by email clients to automatically configure account settings, and mailcow logs these requests for administrative review. When processing Autodiscover requests, the application stores the submitted EMailAddress field in Redis without proper sanitization. Subsequently, when an administrator views the Autodiscover logs through the dashboard, the logged email address values are rendered directly into the HTML without proper output encoding, allowing any embedded JavaScript or HTML to execute in the administrator's browser context.

The vulnerability is particularly dangerous because it requires no authentication to exploit. An attacker simply needs to submit a malicious Autodiscover request to the target mailcow instance with a specially crafted EMailAddress value containing a JavaScript payload. The attack remains dormant until an administrator views the logs, at which point the stored payload executes with the full privileges of the admin session.

Root Cause

The root cause is improper output encoding (CWE-79) in the admin dashboard's log rendering functionality. The application fails to apply HTML escaping to user-controlled data stored in the Autodiscover logs before including it in the admin interface HTML output. This allows user-supplied input from the EMailAddress field to break out of the expected HTML context and inject arbitrary scripts.

Attack Vector

The attack vector is network-based and requires no authentication. An attacker can exploit this vulnerability by sending a crafted Autodiscover request to the vulnerable mailcow instance. The malicious payload in the EMailAddress field gets stored in Redis as part of the normal logging process. When an administrator accesses the Autodiscover logs section of the admin dashboard, the browser renders the stored payload as executable code.

The attack requires user interaction from an administrator (viewing the logs), but the attacker has no prerequisites beyond network access to the mailcow Autodiscover endpoint. Successful exploitation could allow the attacker to steal administrator session cookies, perform actions as the administrator, modify mail server configurations, access sensitive email data, or establish persistence within the mail infrastructure.

For technical details on the vulnerability mechanism and exploitation, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-40872

Indicators of Compromise

  • Unusual Autodiscover requests containing HTML tags or JavaScript syntax in the EMailAddress field
  • Autodiscover log entries with suspicious content such as <script>, onerror=, onload=, or other event handlers
  • Unexpected administrator session activity or authentication events following log review
  • Redis entries containing encoded or obfuscated JavaScript payloads

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block Autodiscover requests containing HTML/JavaScript in email address fields
  • Monitor web server access logs for Autodiscover requests with abnormally long or encoded email parameters
  • Deploy endpoint detection to identify unusual browser behavior during admin dashboard access
  • Review Redis logs and stored data for suspicious content patterns

Monitoring Recommendations

  • Enable detailed logging for all Autodiscover endpoint requests
  • Set up alerts for administrator dashboard access patterns that deviate from normal behavior
  • Monitor for new or modified administrator accounts that may indicate session compromise
  • Implement Content Security Policy (CSP) headers to detect and report XSS attempts

How to Mitigate CVE-2026-40872

Immediate Actions Required

  • Upgrade mailcow: dockerized to version 2026-03b or later immediately
  • Review Autodiscover logs for evidence of exploitation attempts prior to patching
  • Invalidate and rotate all administrator session tokens after updating
  • Audit recent administrator activity for signs of unauthorized access

Patch Information

Version 2026-03b of mailcow: dockerized addresses this vulnerability by implementing proper HTML escaping for the EMailAddress value when rendering Autodiscover logs in the admin dashboard. Administrators should update their mailcow installations to this version or later. For update instructions and additional details, refer to the GitHub Security Advisory.

Workarounds

  • Restrict access to the admin dashboard using network-level controls such as firewall rules or VPN requirements until the patch can be applied
  • Implement a reverse proxy with WAF capabilities to filter potentially malicious Autodiscover requests
  • Temporarily disable logging of Autodiscover requests if feasible for your environment
  • Use browser extensions that block JavaScript execution when reviewing untrusted log data
bash
# Example: Restrict admin dashboard access via iptables
iptables -A INPUT -p tcp --dport 443 -s <trusted_admin_ip> -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j DROP

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechMailcow

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-40873: mailcow dockerized XSS Vulnerability

  • CVE-2026-40875: mailcow dockerized XSS Vulnerability

  • CVE-2026-40878: mailcow dockerized XSS Vulnerability

  • CVE-2024-31204: Mailcow Dockerized XSS 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