mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA mailcow-dockerized (mailcow) Fixed in 2026-03b
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40871
- 2026-10-25 EPSS moved to the 95th–99th percentile
References
More mailcow vulnerabilities
- TI-2026-29528 mailcow: dockerized vulnerable to stored XSS in autodiscover logs email address field CVSS 4.0CRITICAL 9.3
- TI-2026-29529 mailcow: dockerized vulnerable to stored XSS in Quarantine attachment filenames CVSS 4.0HIGH 8.9
- TI-2022-13182 OS Command Injection in mailcow CVSS 3.1HIGH 8.8
- TI-2022-18634 mailcow-dockerized critical information misrepresentation can lead to phishing attacks through Swagger UI CVSS 3.1HIGH 8.2
- TI-2026-06557 mailcow-dockerized 2026-03b - Stored XSS in Queue Manager via unescaped CVSS 4.0HIGH 7.4
- TI-2026-29531 mailcow: dockerized vulnerable to stored XSS in user login history real_rip CVSS 4.0HIGH 7.0
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences