Maddy Mail Server Hit by Critical LDAP Injection Flaw

Maddy Mail Server Hit by Critical LDAP Injection Flaw

The National Vulnerability Database (NVD) recently detailed CVE-2026-40193, a high-severity LDAP injection vulnerability impacting maddy mail server versions prior to 0.9.3. Maddy, known for its composable, all-in-one mail server capabilities, unfortunately overlooked proper LDAP filter escaping in its auth.ldap module. This oversight allows user-supplied usernames to be directly interpolated into LDAP search filters and DN strings without sanitization, despite the go-ldap/ldap/v3 library’s ldap.EscapeFilter() function being readily available.

This flaw manifests in three key areas: the Lookup() filter, and both the DN template and filter used by AuthPlain(). An attacker with network access to either the SMTP submission or IMAP interface can exploit this by injecting arbitrary LDAP filter expressions through the username field during AUTH PLAIN or LOGIN commands. The implications are severe: identity spoofing by manipulating filter results to authenticate as another user, enumeration of LDAP directories using wildcard filters, and even blind extraction of LDAP attribute values. This can be achieved by leveraging authentication responses as a boolean oracle or by exploiting timing side-channels between distinct failure paths. The NVD assigns this a CVSS score of 8.2 (HIGH), categorizing it under CWE-90 (Improper Neutralization of Special Elements used in an LDAP Query (‘LDAP Injection’)).

The good news is that maddy has addressed this critical vulnerability in version 0.9.3. If you’re running an older iteration, it’s time to get patching.

Related ATT&CK Techniques

🛡️ Detection Rules

7 rules · 6 SIEM formats

7 auto-generated detection rules for this incident, mapped to MITRE ATT&CK. Available in Sigma, Splunk SPL, Sentinel KQL, Elastic Lucene, QRadar AQL, and Wazuh.

high T1190 Initial Access

Web Application Exploitation Attempt — CVE-2026-40193

✓ Sigma 🔒 Splunk SPL 🔒 Sentinel KQL 🔒 Elastic 🔒 QRadar AQL 🔒 Wazuh

Want this in your SIEM's native format? Get Splunk SPL, Sentinel KQL, Elastic, QRadar AQL, or Wazuh — ready to paste.

7 Sigma rules mapped to the ATT&CK techniques from this breach — pick your SIEM and get a ready-to-paste query.

Get All SIEM Formats →

Indicators of Compromise

IDTypeIndicator
CVE-2026-40193 LDAP Injection maddy mail server versions prior to 0.9.3
CVE-2026-40193 LDAP Injection auth.ldap module in maddy
CVE-2026-40193 LDAP Injection Vulnerable code paths: Lookup() filter, AuthPlain() DN template, AuthPlain() filter
CVE-2026-40193 Auth Bypass Exploitable via username field in AUTH PLAIN or LOGIN commands over SMTP or IMAP
CVE-2026-40193 Information Disclosure LDAP directory enumeration and blind extraction of LDAP attribute values

Related Posts

CVE-2026-40962 — Out-of-Bounds $1

CVE-2026-40962 — FFmpeg before 8.1 has an integer overflow and resultant out-of-bounds write via CENC (Common Encryption) subsample data to libavformat/mov.c.

vulnerabilityCVEout-of-bounds-1cwe-190
/MEDIUM /⚑ 2 IOCs

Critical Heap Overflow in Creolabs Gravity Exposes Arbitrary Code Execution

CVE-2026-40504 — Creolabs Gravity before 0.9.6 contains a heap buffer overflow vulnerability in the gravity_vm_exec function that allows attackers to write out-of-bounds memory by crafting...

vulnerabilityCVEcriticalhigh-severitycode-executioncwe-122
/CRITICAL /⚑ 3 IOCs

CVE-2026-3299 — Cross-Site Scripting (XSS)

CVE-2026-3299 — The WP YouTube Lyte plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'lyte' shortcode in all versions up to,...

vulnerabilityCVEcross-site-scripting-xss-cwe-79
/MEDIUM /⚑ 2 IOCs