mailcow Cross-site Scripting Vulnerability via Exception Handler
CVE-2024-31204Published 4 Apr 2024, 20:37 UTC
Real-world risk
0.5/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.1
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
mailcow: dockerized is an open source groupware/email suite based on docker. A security vulnerability has been identified in mailcow affecting versions prior to 2024-04. This vulnerability resides in the exception handling mechanism, specifically when not operating in DEV_MODE. The system saves exception details into a session array without proper sanitization or encoding. These details are later rendered into HTML and executed in a JavaScript block within the user's browser, without adequate escaping of HTML entities. This flaw allows for Cross-Site Scripting (XSS) attacks, where attackers can inject malicious scripts into the admin panel by triggering exceptions with controlled input. The exploitation method involves using any function that might throw an exception with user-controllable argument. This issue can lead to session hijacking and unauthorized administrative actions, posing a significant security risk. Version 2024-04 contains a fix for the issue.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| mailcow-dockerizedNiche | < 2024-04 | 2024-04 |
What to do
Update to a fixed version: 2024-04.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | AdjacentSame Wi-Fi, Bluetooth range or network segment | From the CVSS vector | 0.40 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 0.60 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T2: Likely to be exploited (× 0.90)
EPSS probability at least 0.10, or EPSS percentile at least 0.95
EPSS 8.2% chance of exploitation in 30 days (percentile 95), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.076
- Threat T2: Likely to be exploited0.900
- 10 × impact 0.8 × prerequisites 0.0756 × threat 0.90.544
- Rounded to one decimal between 0.1 and 100.5
Exploitation and evidence timeline
- 4 Apr 2024 Published
- 3 Dec 2026 Risk 0.5 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-fp6h-63w4-5hcmvendor-advisory, x-transferred
- https://www.sonarsource.com/blog/remote-code-execution-in-mailcow-always-sanitize-error-messagesmisc
- https://www.vicarius.io/vsociety/posts/mailcow-with-xss-and-path-traversal-cve-2024-31204-and-cve-2024-30270
- CVE-2024-31204 on CVE.org