CVE-2024-31204 json
mailcow Cross-site Scripting Vulnerability via Exception Handler
published 2024-04-04 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-29108
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 8.2%
- EPSS 8.2% chance of exploitation in 30 days, percentile 94%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- mailcow mailcow_dockerized 2024-04
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
8.25% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- sonarsource.com https://www.sonarsource.com/blog/remote-code-execution-in-mailcow-always-sanitize-error-messages referenced PoC, tagged "exploit" by a source, unverified
- vicarius.io https://www.vicarius.io/vsociety/posts/mailcow-with-xss-and-path-traversal-cve-2024-31204-and-cve-2024-30270 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N |
Affected products
- mailcow mailcow-dockerized
- mailcow mailcow_dockerized
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
sonarsource.com
/blog/remote-code-execution-in-mailcow-always-sanitize-error-messages
exploit, third-party-advisory
-
vicarius.io
/vsociety/posts/mailcow-with-xss-and-path-traversal-cve-2024-31204-and-cve-2024-30270
exploit, third-party-advisory
-
github.com
/mailcow/mailcow-dockerized/security/advisories/GHSA-fp6h-63w4-5hcm
vendor-advisory
Sources
- CVE List CVE-2024-31204
- NVD CVE-2024-31204
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.