{"id":"CVE-2026-40193","published":"2026-04-15T23:15:25Z","modified":"2026-04-16T14:23:52Z","title":"Maddy Mail Server: LDAP Filter Injection via Unsanitized Username","vendor":"foxcpp","product":"maddy","tier":"tail","description":{"text":"maddy is a composable, all-in-one mail server. Versions prior to 0.9.3 contain an LDAP injection vulnerability in the auth.ldap module where user-supplied usernames are interpolated into LDAP search filters and DN strings via strings.ReplaceAll() without any LDAP filter escaping, despite the go-ldap/ldap/v3 library's ldap.EscapeFilter() function being available in the same import. This affects three code paths: the Lookup() filter, the AuthPlain() DN template, and the AuthPlain() filter. An attacker with network access to the SMTP submission or IMAP interface can inject arbitrary LDAP filter expressions through the username field in AUTH PLAIN or LOGIN commands. This enables identity spoofing by manipulating filter results to authenticate as another user, LDAP directory enumeration via wildcard filters, and blind extraction of LDAP attribute values using authentication responses as a boolean oracle or via timing side-channels between the two distinct failure paths. This issue has been fixed in version 0.9.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00426,"percentile":0.37775,"provenance":"source"},"cwes":[{"id":"CWE-90","name":"Improper Neutralization of Special Elements used in an LDAP Query"}],"references":[{"url":"https://github.com/foxcpp/maddy/security/advisories/GHSA-5835-4gvc-32pc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/foxcpp/maddy/commit/6a06337eb41fa87a35697366bcb71c3c962c44ba","tags":["x_refsource_MISC"]},{"url":"https://github.com/foxcpp/maddy/releases/tag/v0.9.3","tags":["x_refsource_MISC"]}],"priority":{"score":13.3,"factors":[{"name":"EPSS percentile","points":7.55},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"foxcpp","affectedVersions":[{"vendor":"foxcpp","product":"maddy","versions":["< 0.9.3"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-04-16T14:23:43.299676Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/foxcpp/maddy","vulnerableRanges":["<0.9.3"],"patched":["0.9.3"],"from":["GHSA-5835-4gvc-32pc","GO-2026-5137"],"provenance":"source"}],"summary":{"text":"Maddy mail server (foxcpp/maddy) versions prior to 0.9.3 contain an LDAP injection flaw in the auth.ldap module, where usernames supplied during authentication are interpolated into LDAP search filters and DN strings without escaping. An attacker with network access to the SMTP submission or IMAP interface can exploit this by sending a crafted username in AUTH PLAIN or LOGIN commands, without authentication or user interaction, to spoof another user's identity, enumerate directory entries, or extract LDAP attribute values.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:41:43Z"},"euvd":{"id":"EUVD-2026-23131","exploited":false,"provenance":"source"}}