Skip to main content

mailcow-dockerized CVE-2026-40878

| EUVDEUVD-2026-24262 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-04-21 GitHub_M
2.1
CVSS 4.0 · GitHub Advisory

Severity by source

GitHub Advisory PRIMARY
2.1 LOW
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
6.1 MEDIUM

Reflected XSS over network with no auth needed (PR:N), mandatory user click (UI:R), browser scope change (S:C), low confidentiality and integrity impact, no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
X

Lifecycle Timeline

6
Analysis Generated
Jul 24, 2026 - 07:09 vuln.today
Patch released
Apr 22, 2026 - 21:02 nvd
Patch available
Patch available
Apr 21, 2026 - 21:02 EUVD
CVSS changed
Apr 21, 2026 - 20:22 NVD
2.1 (LOW)
EUVD ID Assigned
Apr 21, 2026 - 20:00 euvd
EUVD-2026-24262
CVE Published
Apr 21, 2026 - 19:21 nvd
LOW 2.1

DescriptionGitHub Advisory

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.

AnalysisAI

Reflected XSS in mailcow-dockerized's login page (all versions prior to 2026-03b) allows a remote unauthenticated attacker to inject and execute arbitrary JavaScript in a victim's browser by delivering a crafted URL. The flaw stems from two compounding issues: the raw REQUEST_URI server variable is rendered inside a JavaScript string literal in base.twig using HTML-only escaping instead of JS-context escaping, and the query_string() helper propagates all $_GET parameters into language-switching links, preserving injected payloads across page navigation. A publicly available Nuclei detection template confirms the attack surface is known; however, SSVC lists exploitation as 'none' and EPSS at 0.05% indicates no observed widespread abuse at time of analysis.

Technical ContextAI

mailcow-dockerized (CPE: cpe:2.3:a:mailcow:mailcow-dockerized:*:*:*:*:*:*:*:*) is a Docker-based open-source email and groupware platform using PHP and the Twig templating engine. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) arises in two places within base.twig: first, $_SERVER['REQUEST_URI'] is injected as a global Twig template variable and embedded directly inside a JavaScript string literal within the setLang() helper, where Twig's default HTML auto-escaping is insufficient - it does not neutralize JS-breaking characters such as backslashes, unescaped quotes, or newlines that could close the string context and inject executable code; second, the query_string() Twig helper blindly merges all current $_GET parameters into language-switching anchor links on the login page, expanding the reflection surface and allowing an attacker's payload to persist across language-toggle navigation without re-delivery. The fix in 2026-03b applies the appropriate |escape('js') Twig filter in the JavaScript context and sanitizes $_GET passthrough in the helper.

RemediationAI

Upgrade mailcow-dockerized to version 2026-03b or later, which resolves the vulnerability by applying context-aware Twig JS escaping to REQUEST_URI in the setLang() JavaScript block and sanitizing $_GET parameter passthrough in the query_string() helper. The vendor advisory and patch details are at https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-xv9r-j862-5hqf. If immediate upgrade is not feasible, restrict access to the mailcow login page to trusted IP ranges via reverse proxy or firewall rules - this reduces the attack surface for external phishing-driven exploitation but does not protect against threats originating from trusted networks. Additionally, deploying a strict Content Security Policy header (e.g., script-src 'self') on the mailcow web interface would limit injected script execution; note this may require testing against legitimate mailcow UI behavior as CSP can interfere with inline script usage elsewhere in the application.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

CVE-2025-34221 CRITICAL POC
10.0 Sep 29

Vasion Print (formerly PrinterLogic) Virtual Appliance Host prior to version 25.2.169 and Application prior to version 2

Share

CVE-2026-40878 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy