CVE-2026-40871
published high CVSS 3.1 · 7.2mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| mailcow | — | mailcow-dockerized< 2026-03b | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.2 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| mailcow | mailcow-dockerized | < 2026-03b (affected) | GitHub_M · cna |
Weaknesses
4- CWE-20 CWE-20: Improper Input Validation
- CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
- CWE-116 CWE-116: Improper Encoding or Escaping of Output
- CWE-564 CWE-564: SQL Injection: Hibernate
References
1Provider assertions
2GitHub_M · cna
mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e305753c8e792f7be761f9a04118d381ea1e92bdcc3471e37f40ed2650956c84
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record