Skip to main content

mailcow dockerized CVE-2026-40875

| EUVDEUVD-2026-24258 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-04-21 GitHub_M
7.0
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Attacker authenticates with crafted X-Real-IP header
  2. Delivery
    Malicious JavaScript stored in login history
  3. Exploit
    Login CSRF forces victim into attacker account
  4. Install
    Victim views poisoned dashboard
  5. C2
    XSS executes in victim context
  6. Execute
    Script accesses victim's email tab
  7. Impact
    Exfiltrate sensitive emails to attacker server

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

Attacker must possess valid low-privileged credentials on the target mailcow instance to seed the XSS payload via manipulated X-Real-IP header during their own login. Victim must be successfully targeted by Login CSRF attack to force authentication into attacker's account - this requires victim to click a malicious link or visit an attacker-controlled page. Victim must have an active authenticated session to their own mailcow account in a different browser tab or window at the time of CSRF-forced login. Victim must navigate to or auto-load the 'Seen successful connections' dashboard in the attacker's account to trigger XSS execution. The mailcow instance must be configured to trust X-Real-IP or X-Forwarded-For headers for login logging, which is default behavior in standard Docker reverse proxy deployments. Exploitation requires coordination of multiple user interaction steps, limiting mass exploitation but enabling targeted attacks against specific high-value users. Browser-based XSS protections (CSP, XSS Auditor) may limit but not fully prevent exploitation depending on mailcow's Content-Security-Policy configuration.

Impact

Real-world risk is moderate to high for targeted attacks despite the 7.0 CVSS score requiring specific conditions. The CVSS vector indicates network-based attack (AV:N) but with high complexity (AC:H) and prerequisite conditions (AT:P), requiring low-privileged access (PR:L) and user interaction (UI:P). The high confidentiality impact to both vulnerable and subsequent systems (VC:H/SC:H) and high system integrity impact (SI:H) reflect the email access exposure. EPSS data not provided, but the attack chain complexity (requiring CSRF setup, victim login to attacker account, then tab interaction) suggests low probability of mass exploitation. However, for targeted attacks against high-value mailcow installations, this is highly viable - the attacker needs only a low-privilege account on the target mailcow instance. The GitHub Security Advisory disclosure provides sufficient technical detail for proof-of-concept development. SSVC indicators point to attended exploitation (requires social engineering), not automatable (multi-step attack chain), with high technical impact (email access). Priority depends on deployment context: critical for multi-tenant mailcow instances or environments with privileged users, lower for single-organization deployments with strong access controls.

Exploit ScenarioDerived

An attacker with a low-privilege account on the target mailcow instance crafts a malicious X-Real-IP header containing JavaScript payload and authenticates to their own account, poisoning their login history. They then construct a Login CSRF attack (e.g., hidden iframe or social engineering link) that forces the victim to authenticate into the attacker's mailcow account while the victim has their own mailcow inbox open in another browser tab. When the victim views the attacker's account dashboard, the stored XSS executes in the victim's browser context with the victim's session cookies, allowing the malicious script to access and exfiltrate emails from the victim's separate authenticated mailcow session via same-origin requests.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
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

Cross-site scripting in mailcow dockerized versions prior to 2026-03b enables remote attackers to execute malicious JavaScript in victim browsers through a chained Login CSRF and Self-XSS attack. Exploitation requires low-privileged attacker credentials and victim interaction, but can result in unauthorized access to victim email accounts and session hijacking (CVSS 7.0, AV:N/AC:H/PR:L/UI:P). The vulnerability stems from insufficient HTML escaping of X-Real-IP header values in the login history dashboard, combined with server trust of client-supplied IP headers. No active exploitation or public POC identified at time of analysis, but technical details disclosed via GitHub Security Advisory make weaponization feasible.

RemediationAI

Upgrade immediately to mailcow dockerized version 2026-03b or later, which implements proper HTML escaping for login history display fields. Download the patched release from the official mailcow GitHub repository. The upgrade process follows standard mailcow update procedures via docker-compose pull and restart. For installations unable to upgrade immediately, implement these compensating controls with noted limitations: First, restrict mailcow dashboard access to trusted networks only via firewall rules or VPN requirements - this reduces attack surface but does not eliminate insider threat risk. Second, configure the reverse proxy (nginx/Traefal/HAProxy) to strip or sanitize X-Real-IP and X-Forwarded-For headers from untrusted sources, replacing them with the actual TCP connection IP - however, this breaks legitimate IP geolocation and may interfere with rate limiting based on client IP. Third, disable the login history feature in the user dashboard if the codebase allows - this eliminates the XSS sink but reduces security visibility for users. None of these workarounds are complete mitigations; the vendor patch is required for full resolution. Consult the GitHub Security Advisory at https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-jprq-w83q-q62h for detailed remediation guidance and release notes.

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), a containerized email groupware suite deployed via Docker. The root cause is improper neutralization of input during web page generation (CWE-79, classic stored XSS). The application's login logging mechanism captures the client IP address from the X-Real-IP HTTP header - a reverse proxy header commonly used in Docker deployments behind nginx or similar load balancers. This header value is stored in login history without sanitization and later rendered in the user dashboard's 'Seen successful connections' interface without HTML escaping. Because HTTP headers are fully attacker-controlled, this creates a stored XSS sink. The trust in client-supplied headers is a common misconfiguration in containerized environments where developers assume reverse proxy headers are authoritative without validating their source.

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

Vendor (GitHub_M) PRIMARY 7.0 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:P/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
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
7.0 (HIGH)
CVE Published
Apr 21, 2026 - 19:19 nvd
HIGH 7.0

DescriptionCVE.org

mailcow: dockerized is an open source groupware/email suite based on docker. In versions prior to 2026-03b, the user dashboard's "Seen successful connections" (login history) renders the client IP from login logs without HTML escaping. Because the server trusts the X-Real-IP header as the source IP for logging, an attacker can inject HTML/JS into this field. This Self-XSS can be exploited by a Login CSRF to force the victim into the attacker's account, and then read emails in a previous browser tab. Version 2026-03b fixes the vulnerability.

Executive ViewAI

Why It Matters

mailcow (dockerized versions before 2026-03b) contains a cross-site scripting vulnerability in the login history feature that allows authenticated attackers to hijack user sessions and gain unauthorized access to email accounts through a combination of CSRF and XSS techniques. Organizations running affected mailcow instances face risk of email compromise and credential theft, particularly if users click malicious links while logged in.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict login history dashboard access via network-level controls or authentication layers; (2) Implement reverse proxy rules to sanitize or block untrusted X-Real-IP header values before reaching mailcow; (3) Deploy WAF with XSS filtering on all login-related endpoints; (4) enforce strict Content-Security-Policy headers; (5) Require re-authentication for sensitive account changes; (6) monitor and alert on unusual login history access patterns.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% 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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

35
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +35
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.

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

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-125757 CRITICAL
9.4 Nov 10

Stored server-side template injection in mailcow: dockerized releases before 2026-11 lets an authenticated domain admini

CVE-2026-40872 CRITICAL
9.3 Apr 21

Stored cross-site scripting in mailcow dockerized versions before 2026-03b enables remote attackers to execute arbitrary

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

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