CVE-2026-40878

mailcow-dockerized Login Page has Reflected Parameter Injection / Wrong-Context XSS Escaping

Published Apr 21, 2026 CVSS 4.0 · 2.1 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Mailcow‑dockerized versions earlier 2026‑03b incorrectly render the raw request URI inside a JavaScript string literal in the base.twig template. Because Twig’s default HTML auto‑escaping is applied instead of JavaScript‑specific escaping, an attacker can inject arbitrary JavaScript that will execute when a victim visits the login page. This reflected parameter injection flaw can lead to credential theft, session hijacking, or other client‑side attacks, and maps to CWE‑79.

Affected Systems

The vulnerability affects any deployment of mailcow‑dockerized running version 2026‑03b or earlier. The vendor has released 2026‑03b which removes the unsafe rendering of REQUEST_URI from the template.

Risk and Exploitability

The CVSS score of 2.1 indicates low severity, and the EPSS score of less than 1% suggests a very low probability of exploitation. The flaw is not listed in CISA KEV. Exploitation requires only that a victim opens a crafted URL pointing to the login page; no authentication or privileged state is needed. While the risk is low absent a social‑engineering campaign, the exposure warrants timely patching to eliminate the XSS surface.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade mailcow‑dockerized to version 2026‑03b or later, which fixes the unsafe rendering of REQUEST_URI.
  • If an upgrade cannot be applied immediately, modify base.twig to use the "js" escape strategy for the string literal or strip and encode $_SERVER['REQUEST_URI'] before passing it to Twig, thus removing the reflected input.
  • As a temporary measure, enforce firewall or URL rewrite rules that detect and block or sanitize query parameters containing script payloads when accessing the login page.

Generated by OpenCVE AI on June 18, 2026 at 08:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mailcow
Mailcow mailcow Dockerized
Vendors & Products Mailcow
Mailcow mailcow Dockerized
Type Values Removed Values Added
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.
Title mailcow-dockerized Login Page has Reflected Parameter Injection / Wrong-Context XSS Escaping
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 22, 2026, 1:39 PM
Reserved
Apr 15, 2026, 3:57 PM
Status
Deferred
Published
Apr 21, 2026, 8:17 PM
Modified
Oct 26, 2026, 10:10 PM