CVE-2026-40878: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in mailcow mailcow-dockerized
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.
AI Analysis
Technical Summary
mailcow-dockerized before version 2026-03b improperly neutralizes input during web page generation, specifically in the handling of the $_SERVER['REQUEST_URI'] variable. The raw URI is passed to Twig templates and rendered inside JavaScript string literals using Twig's default HTML auto-escaping rather than the context-appropriate JavaScript escaping. Additionally, the query_string() Twig helper merges all current GET parameters into language-switching links on the login page, preserving attacker-supplied parameters across navigation. This results in a reflected cross-site scripting vulnerability (CWE-79).
Potential Impact
An attacker can inject malicious scripts via crafted URLs that manipulate the REQUEST_URI or GET parameters, which are then reflected in the login page's JavaScript context. This could lead to execution of arbitrary scripts in the context of the victim's browser, potentially enabling session hijacking or other client-side attacks. The CVSS 4.0 score is 2.1, indicating low severity with low impact and requiring user interaction.
Mitigation Recommendations
Upgrade mailcow-dockerized to version 2026-03b or later, where this vulnerability is fixed by applying proper JavaScript context escaping in Twig templates. Since no official patch link or advisory is provided, users should verify the version and update accordingly. Patch status is not explicitly confirmed beyond the version fix; check vendor resources 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
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
mailcow-dockerized before version 2026-03b improperly neutralizes input during web page generation, specifically in the handling of the $_SERVER['REQUEST_URI'] variable. The raw URI is passed to Twig templates and rendered inside JavaScript string literals using Twig's default HTML auto-escaping rather than the context-appropriate JavaScript escaping. Additionally, the query_string() Twig helper merges all current GET parameters into language-switching links on the login page, preserving attacker-supplied parameters across navigation. This results in a reflected cross-site scripting vulnerability (CWE-79).
Potential Impact
An attacker can inject malicious scripts via crafted URLs that manipulate the REQUEST_URI or GET parameters, which are then reflected in the login page's JavaScript context. This could lead to execution of arbitrary scripts in the context of the victim's browser, potentially enabling session hijacking or other client-side attacks. The CVSS 4.0 score is 2.1, indicating low severity with low impact and requiring user interaction.
Mitigation Recommendations
Upgrade mailcow-dockerized to version 2026-03b or later, where this vulnerability is fixed by applying proper JavaScript context escaping in Twig templates. Since no official patch link or advisory is provided, users should verify the version and update accordingly. Patch status is not explicitly confirmed beyond the version fix; check vendor resources 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/21/2026, 7:47:23 PM
Last updated: 4/22/2026, 6:06:02 AM
Views: 7
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.