{"id":"CVE-2026-40871","published":"2026-04-21T19:12:52Z","modified":"2026-04-21T20:36:30Z","title":"mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API","vendor":"mailcow","product":"mailcow-dockerized","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.08889,"percentile":0.95346,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"},{"id":"CWE-564","name":"Use of Hibernate with HQL/SQL Query String Containing External Input"}],"references":[{"url":"https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-r8fq-wrfm-cj2q","tags":["x_refsource_CONFIRM"]}],"priority":{"score":24.1,"factors":[{"name":"EPSS percentile","points":19.07},{"name":"CVSS severity","points":5.04}]},"vendorSlug":"mailcow","affectedVersions":[{"vendor":"mailcow","product":"mailcow-dockerized","versions":["< 2026-03b"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-04-21T19:53:34.653739Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-24253","exploited":false,"provenance":"source"}}