CVE-2024-31204

MEDIUM
Published Apr 4, 2024 Modified Oct 6, 2025 CWE-79

Description

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.

Is your site exposed to CVE-2024-31204?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

6.1
MEDIUM
CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N

Weakness Type (CWE)

CWE-79 Cross-site Scripting (XSS)

Affected Products

Vendor Product
mailcow mailcow\

References

Frequently Asked Questions

What is CVE-2024-31204? +
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. It has a CVSS v3.1 base score of 6.1 (MEDIUM).
How severe is CVE-2024-31204? +
CVE-2024-31204 has a CVSS v3.1 score of 6.1 out of 10, rated MEDIUM. This is a medium-severity vulnerability that should be remediated as part of regular maintenance.
What products are affected by CVE-2024-31204? +
CVE-2024-31204 affects products from mailcow, specifically: mailcow\. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-31204? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-31204 — free, no signup required.