CVE-2026-40193 json
Maddy Mail Server: LDAP Filter Injection via Unsanitized Username
published 2026-04-13 6 mo ago modified 2026-10-26 13 d ago also EUVD-2026-23131 , GHSA-5835-4gvc-32pc , GO-2026-5137
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 36%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/foxcpp/maddy 0.9.3
- maddy_project maddy 0.9.3
- govulncheck-vulndb openSUSE Leap 16.0 0.0.20260723T184607-160000.1.1
opensuse advisories openSUSE-SU-2026:21483-1
- maddy Alpine 3.24, Alpine 3.23 0.9.3-r0
alpine advisories ALPINE-CVE-2026-40193
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-40193 updated cvss 8.2
maddy: maddy: Identity spoofing and information disclosure via LDAP injection
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 6 mo ago
Exploit prediction
0.42% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/foxcpp/maddy/security/advisories/GHSA-5835-4gvc-32pc referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/foxcpp/maddy | <0.9.3 |
0.9.3 |
Affected products
- foxcpp maddy
Classification
- Weakness
-
- CWE-90 Improper Neutralization of Special Elements used in an LDAP Query
References
-
github.com
/foxcpp/maddy/commit/6a06337eb41fa87a35697366bcb71c3c962c44ba
web, patch
-
github.com
/foxcpp/maddy/security/advisories/GHSA-5835-4gvc-32pc
web, exploit, vendor-advisory, advisory
-
github.com
/foxcpp/maddy/releases/tag/v0.9.3
web, product, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-40193
advisory
-
github.com
/foxcpp/maddy
package
Sources
- CVE List CVE-2026-40193
- GitHub Advisory GHSA-5835-4gvc-32pc
- NVD CVE-2026-40193
- OSV GO-2026-5137
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.