Skip to main content

mailcow: dockerized CVE-2026-40871

| EUVDEUVD-2026-24253 HIGH
Improper Input Validation (CWE-20)
2026-04-21 GitHub_M
7.2
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
7.2 HIGH
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

7
Patch released
Apr 22, 2026 - 21:02 nvd
Patch available
Re-analysis Queued
Apr 21, 2026 - 21:22 vuln.today
cvss_changed
Patch available
Apr 21, 2026 - 21:02 EUVD
Analysis Generated
Apr 21, 2026 - 20:50 vuln.today
EUVD ID Assigned
Apr 21, 2026 - 20:00 euvd
EUVD-2026-24253
Analysis Generated
Apr 21, 2026 - 20:00 vuln.today
CVE Published
Apr 21, 2026 - 19:12 nvd
HIGH 7.2

DescriptionGitHub Advisory

mailcow: dockerized is an open source groupware/email suite based on docker. Versions prior to 2026-03b have a second-order SQL injection vulnerability in the quarantine_category field via the Mailcow API. The /api/v1/add/mailbox endpoint stores quarantine_category without validation or sanitization. This value is later used by quarantine_notify.py, which constructs SQL queries using unsafe % string formatting instead of parameterized queries. This results in a delayed (second-order) SQL injection when the quarantine notification job executes, allowing an attacker to inject arbitrary SQL. Using a UNION SELECT, sensitive data (e.g., admin credentials) can be exfiltrated and rendered inside quarantine notification emails. Version 2026-03b fixes the vulnerability.

AnalysisAI

Second-order SQL injection in mailcow: dockerized versions prior to 2026-03b allows authenticated API users with high privileges to execute arbitrary SQL commands through the quarantine notification system. Attackers inject malicious SQL via the quarantine_category field in /api/v1/add/mailbox endpoint, which executes when quarantine_notify.py runs its scheduled job, enabling data exfiltration of admin credentials and sensitive information through UNION-based queries rendered in notification emails. No public exploit code or active exploitation confirmed at time of analysis, with vendor patch available in version 2026-03b.

Technical ContextAI

This vulnerability affects mailcow: dockerized (cpe:2.3:a:mailcow:mailcow-dockerized), a containerized open-source groupware and email suite. The flaw stems from CWE-20 (Improper Input Validation) manifesting as a second-order SQL injection. Unlike traditional SQL injection where malicious input is immediately executed, second-order SQL injection occurs when untrusted data is stored in the database and later retrieved and used in dynamically constructed SQL queries. The vulnerable code path involves the Mailcow API's /api/v1/add/mailbox endpoint accepting quarantine_category values without validation or parameterization, storing them directly. Subsequently, the quarantine_notify.py script retrieves these values and incorporates them into SQL queries using Python's unsafe % string formatting (string interpolation) rather than parameterized queries or prepared statements. When the scheduled quarantine notification job executes, the stored malicious SQL payload is injected into the query context, enabling UNION SELECT operations that can extract arbitrary data from the database and embed it in outgoing email notifications.

RemediationAI

Upgrade immediately to mailcow: dockerized version 2026-03b or later, which addresses the SQL injection vulnerability by implementing proper input validation and parameterized queries in the quarantine notification system. Follow the vendor security advisory at https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-r8fq-wrfm-cj2q for upgrade procedures specific to containerized deployments. As compensating controls until patching is complete, implement strict API access controls by auditing and restricting high-privilege API credentials to only essential service accounts, enable comprehensive API request logging for the /api/v1/add/mailbox endpoint to detect suspicious quarantine_category values, and review existing mailbox configurations for anomalous quarantine_category entries that may contain SQL injection payloads (look for SQL keywords like UNION, SELECT, or special characters in stored values). Consider temporarily disabling automated quarantine notifications via quarantine_notify.py if immediate patching is not feasible, though this will impact legitimate quarantine management workflows. After upgrading, rotate all administrative and API credentials as a precautionary measure given the credential exfiltration capabilities of this vulnerability.

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

CVE-2024-23054 CRITICAL POC
9.8 Feb 05

An issue in Plone Docker Official Image 5.2.13 (5221) open-source software that could allow for remote code execution du

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2026-46339 CRITICAL POC
10.0 May 19

Unauthenticated remote code execution in 9router (npm package) versions 0.4.30 through 0.4.36 allows network-adjacent at

Share

CVE-2026-40871 vulnerability details – vuln.today

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