CVE-2026-40871

mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API

HIGH
7.2
CVSS Score
Published: April 21, 2026 at 07:12 PM UTC
Updated: October 26, 2026 at 10:10 PM UTC
1 product affected across 1 vendorMailcow

Using mailcow-dockerized by mailcow?

Get instant alerts when new vulnerabilities affect mailcow-dockerized - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.2
Exploit prediction
EPSS 9%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2026-03b
Affected range stops below 2026-3b, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.2HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-20CWE-89CWE-116CWE-564

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card