CVE-2026-40878: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in mailcow mailcow-dockerized
CVE-2026-40878 is a low-severity cross-site scripting (XSS) vulnerability in mailcow-dockerized versions prior to 2026-03b. The vulnerability arises because the web interface improperly passes the raw request URI to the Twig template engine and renders it inside a JavaScript string literal without appropriate JavaScript context escaping. Additionally, attacker-controlled GET parameters are reflected and preserved in language-switching links on the login page. This issue was fixed in version 2026-03b.
AI Analysis
Technical Summary
mailcow-dockerized before version 2026-03b suffers from an improper neutralization of input during web page generation (CWE-79). Specifically, the raw $_SERVER['REQUEST_URI'] is passed to Twig as a global template variable and rendered inside a JavaScript string literal in the setLang() helper of base.twig. The default HTML auto-escaping in Twig is insufficient for JavaScript context, leading to potential XSS. Furthermore, the query_string() Twig helper merges all current $_GET parameters into language-switching links on the login page, allowing attacker-supplied parameters to be reflected and persist across navigation. The vulnerability is resolved in version 2026-03b.
Potential Impact
An attacker can inject malicious scripts via crafted URLs or GET parameters that are reflected in the web interface's JavaScript context and language-switching links. This could lead to cross-site scripting attacks with limited impact due to the low CVSS score (2.1). Exploitation requires user interaction and results in low confidentiality, integrity, and availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade mailcow-dockerized to version 2026-03b or later, where this vulnerability is fixed. Since the vendor advisory does not provide additional remediation details, applying this official fix is the recommended action. Patch status is not explicitly confirmed beyond the version fix note; verify with the vendor advisory for the latest remediation guidance.
CVE-2026-40878: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in mailcow mailcow-dockerized
Description
CVE-2026-40878 is a low-severity cross-site scripting (XSS) vulnerability in mailcow-dockerized versions prior to 2026-03b. The vulnerability arises because the web interface improperly passes the raw request URI to the Twig template engine and renders it inside a JavaScript string literal without appropriate JavaScript context escaping. Additionally, attacker-controlled GET parameters are reflected and preserved in language-switching links on the login page. This issue was fixed in version 2026-03b.
CVSS v4.0
Score 2.1low
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
mailcow-dockerized before version 2026-03b suffers from an improper neutralization of input during web page generation (CWE-79). Specifically, the raw $_SERVER['REQUEST_URI'] is passed to Twig as a global template variable and rendered inside a JavaScript string literal in the setLang() helper of base.twig. The default HTML auto-escaping in Twig is insufficient for JavaScript context, leading to potential XSS. Furthermore, the query_string() Twig helper merges all current $_GET parameters into language-switching links on the login page, allowing attacker-supplied parameters to be reflected and persist across navigation. The vulnerability is resolved in version 2026-03b.
Potential Impact
An attacker can inject malicious scripts via crafted URLs or GET parameters that are reflected in the web interface's JavaScript context and language-switching links. This could lead to cross-site scripting attacks with limited impact due to the low CVSS score (2.1). Exploitation requires user interaction and results in low confidentiality, integrity, and availability impact. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade mailcow-dockerized to version 2026-03b or later, where this vulnerability is fixed. Since the vendor advisory does not provide additional remediation details, applying this official fix is the recommended action. Patch status is not explicitly confirmed beyond the version fix note; verify with the vendor advisory for the latest remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-15T15:57:41.719Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e7d08919fe3cd2cdf3fb22
Added to database: 4/21/2026, 7:31:21 PM
Last enriched: 4/29/2026, 11:37:02 AM
Last updated: 6/4/2026, 10:38:51 PM
Views: 55
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.