CVE-2026-40871

Source
https://cve.org/CVERecord?id=CVE-2026-40871
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40871.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-40871
Aliases
  • GHSA-r8fq-wrfm-cj2q
Published
2026-04-21T19:12:52.781Z
Modified
2026-07-08T08:13:12.722836056Z
Severity
  • 7.2 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
mailcow: dockerized vulnerable to Second Order SQL Injection in quarantine category via API
Details

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 quarantinecategory field via the Mailcow API. The /api/v1/add/mailbox endpoint stores quarantinecategory 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40871.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-116",
        "CWE-20",
        "CWE-564",
        "CWE-89"
    ]
}
References

Affected packages

Git / github.com/mailcow/mailcow-dockerized

Affected ranges

Type
GIT
Repo
https://github.com/mailcow/mailcow-dockerized
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "source": "AFFECTED_FIELD",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "2026-03b"
        }
    ]
}

Affected versions

Other
2022-01
2022-01a
2022-03
2022-03a
2022-05
2022-05a
2022-05b
2022-05c
2022-05d
2022-06
2022-06a
2022-06b
2022-07
2022-07a
2022-08
2022-08a
2022-08b
2022-09
2022-09a
2022-10
2022-10a
2022-11
2022-11a
2022-11b
2022-12
2022-12a
2022-12b
2023-01
2023-01a
2023-02
2023-02a
2023-03
2023-04
2023-04a
2023-04b
2023-05
2023-05a
2023-07
2023-07a
2023-08
2023-09
2023-10
2023-10a
2023-11
2023-11a
2023-12
2023-12a
2024-01
2024-01a
2024-01b
2024-01c
2024-01d
2024-01e
2024-02
2024-04
2024-06
2024-06a
2024-06b
2024-06c
2024-07
2024-08
2024-08a
2024-11
2024-11a
2024-11b
2025-01
2025-01a
2025-02
2025-03
2025-03a
2025-03b
2025-05
2025-07
2025-09
2025-09a
2025-09b
2025-09c
2025-10
2025-10a
2025-12
2025-12a
2026-01
2026-03
2026-03a

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40871.json"