PT-2026-33640 · Mailcow · Mailcow

CVE-2026-40871

·

Published

2026-04-19

·

Updated

2026-04-27

CVSS v3.1

7.2

High

VectorAV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions mailcow: dockerized versions prior to 2026-03b
Description A second-order SQL injection exists in the Mailcow API. The endpoint '/api/v1/add/mailbox' stores the quarantine category variable without proper validation or sanitization. This value is subsequently used by the quarantine notify.py function, which constructs SQL queries using unsafe string formatting instead of parameterized queries. This allows an attacker with API access to inject arbitrary SQL, which is executed when the quarantine notification job runs. This can lead to the exfiltration of sensitive data, such as admin credentials, which are then rendered inside quarantine notification emails.
Recommendations Update to version 2026-03b.

Exploit

Fix

RCE

Improper Encoding or Escaping of Output

SQL injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-40871
GHSA-R8FQ-WRFM-CJ2Q

Affected Products

Mailcow