CVE-2026-40878 Details
Description
mailcow: dockerized is an open source groupware/email suite based on docker. In versions prior to 2026-03b, the mailcow web interface passes the raw `$_SERVER['REQUEST_URI']` to Twig as a global template variable and renders it inside a JavaScript string literal in the `setLang()` helper of `base.twig`, relying on Twig's default HTML auto-escaping instead of the context-appropriate `js` escaping strategy. In addition, the `query_string()` Twig helper merges all current `$_GET` parameters into the language-switching links on the login page, so attacker-supplied parameters are reflected and preserved across navigation. Version 2026-03b fixes the vulnerability.
A reflected parameter injection vulnerability allowing for wrong-context cross-site scripting (XSS) has been identified in mailcow: dockerized versions prior to 2026-03b. The issue arises because the mailcow web interface passes the raw `$_SERVER['REQUEST_URI']` to Twig as a global template variable. This raw data is then rendered inside a JavaScript string literal in the `setLang()` helper of `base.twig`, using Twig's default HTML auto-escaping instead of the appropriate JavaScript escaping. Additionally, the `query_string()` Twig helper combines all current `$_GET` parameters into language-switching links on the login page, allowing attacker-supplied parameters to be reflected and preserved across navigation.
Users are advised to upgrade to mailcow: dockerized version 2026-03b or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Apr 21, 2026CISA-ADP
Assessed Apr 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-xv9r-j862-5hqf | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| mailcow: dockerized | < 2026-03b |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 21, 2026 | New CVE Received | [email protected] |
Volerion