{"id":"CVE-2026-40871","aliases":["CVE-2026-40871"],"related":[],"kind":"vulnerability","state":"published","title":"mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API","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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"mailcow: dockerized es una suite de groupware/correo electrónico de código abierto basada en docker. Las versiones anteriores a 2026-03b tienen una vulnerabilidad de inyección SQL de segundo orden en el campo quarantine_category a través de la API de Mailcow. El endpoint /api/v1/add/mailbox almacena quarantine_category sin validación ni saneamiento. Este valor es utilizado posteriormente por quarantine_notify.py, que construye consultas SQL utilizando formato de cadena % inseguro en lugar de consultas parametrizadas. Esto resulta en una inyección SQL retrasada (de segundo orden) cuando se ejecuta el trabajo de notificación de cuarentena, permitiendo a un atacante inyectar SQL arbitrario. Usando un UNION SELECT, los datos sensibles (p. ej., credenciales de administrador) pueden ser exfiltrados y renderizados dentro de los correos electrónicos de notificación de cuarentena. La versión 2026-03b corrige la vulnerabilidad.","source":"nvd"}],"published":"2026-04-21T19:12:52.781Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-20","CWE-89","CWE-116","CWE-564"],"affected":[{"ranges":[{"version":"< 2026-03b","status":"affected"}],"vendor":"mailcow","product":"mailcow-dockerized","source":"cvelist"}],"references":[{"url":"https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-r8fq-wrfm-cj2q","tags":["exploit","x-refsource-confirm"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-04-21T19:53:34.653Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40871","url":"https://www.cve.org/CVERecord?id=CVE-2026-40871","licence":"CVE Terms of Use","modified":"2026-04-21T20:36:30.751Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40871","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40871","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:19.135Z","epss":{"score":0.08889,"percentile":0.95332,"date":"2026-12-01T12:00:22.000Z"}}