Mailcow SQLi: Second-Order Vulnerability in Quarantine Notifications

Mailcow SQLi: Second-Order Vulnerability in Quarantine Notifications

The National Vulnerability Database has detailed CVE-2026-40871, a critical second-order SQL injection vulnerability impacting mailcow: dockerized versions prior to 2026-03b. This flaw stems from improper handling of the quarantine_category field via the Mailcow API’s /api/v1/add/mailbox endpoint. The input is stored without validation and later used unsafely by quarantine_notify.py when constructing SQL queries, leading to arbitrary SQL execution during the quarantine notification job.

This isn’t a speculative risk. An attacker can leverage a UNION SELECT statement to exfiltrate sensitive data, including critical admin credentials, directly within the quarantine notification emails. The CVSS score of 7.2 (HIGH) is well-deserved; this is a direct path to sensitive data and potentially full system compromise for any exposed mailcow instance. It highlights a common developer pitfall: assuming data is safe after initial storage, only for it to be misused downstream.

Defenders running mailcow: dockerized must prioritize patching to version 2026-03b immediately. Beyond patching, this serves as a stark reminder that input validation and parameterized queries are non-negotiable at every stage of data processing, especially when data persists and is reused in backend operations. Attackers will always look for these delayed execution paths.

What This Means For You

  • If your organization uses mailcow: dockerized, immediately verify that you are running version 2026-03b or later to mitigate CVE-2026-40871. Prioritize this patch, as an attacker can exfiltrate sensitive data, including admin credentials, via a second-order SQL injection.

Related ATT&CK Techniques

🛡️ Detection Rules

3 rules · 6 SIEM formats

3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.

critical T1190 Initial Access

CVE-2026-40871 Mailcow API SQL Injection Attempt

Sigma YAML — free preview
✓ Sigma · Splunk SPL Sentinel KQL Elastic QRadar AQL Wazuh Export via Bot →

Indicators of Compromise

IDTypeIndicator
CVE-2026-40871 SQLi mailcow: dockerized versions prior to 2026-03b
CVE-2026-40871 SQLi Vulnerable field: quarantine_category via Mailcow API
CVE-2026-40871 SQLi Vulnerable endpoint: /api/v1/add/mailbox
CVE-2026-40871 SQLi Vulnerable component: quarantine_notify.py (unsafe string formatting)
Source & Attribution
Source PlatformNVD
ChannelNational Vulnerability Database
PublishedApril 21, 2026 at 23:17 UTC

This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.

Believe this infringes your rights? Submit a takedown request.

Related Posts

HKUDS OpenHarness Default Config Exposes Systems (CVE-2026-6823)

CVE-2026-6823 — HKUDS OpenHarness prior to PR #147 remediation contains an insecure default configuration vulnerability where remote channels inherit allow_from = ["*"] permitting arbitrary remote...

vulnerabilityCVEhigh-severitycwe-276
/SCW Vulnerability Desk /HIGH /8.2 /⚑ 3 IOCs /⚙ 3 Sigma

Critical AVideo XSS Vulnerability Exposes Admin Settings

CVE-2026-40925 — WWBN AVideo is an open source video platform. In versions 29.0 and prior, `objects/configurationUpdate.json.php` (also routed via `/updateConfig`) persists dozens of global site...

vulnerabilityCVEhigh-severitycwe-352
/SCW Vulnerability Desk /HIGH /8.3 /⚑ 5 IOCs /⚙ 3 Sigma

Critical RCE in AVideo YPTSocket Plugin: Unauthenticated Account Takeover

CVE-2026-40911 — WWBN AVideo is an open source video platform. In versions 29.0 and prior, the YPTSocket plugin's WebSocket server relays attacker-supplied JSON message bodies...

vulnerabilityCVEcriticalhigh-severitycwe-94
/SCW Vulnerability Desk /CRITICAL /10 /⚑ 2 IOCs /⚙ 3 Sigma