Maddy 0.5.0 before 0.9.7 contains a timing discrepancy in the auth.ldap AuthPlain search mode that allows unauthenticated attackers to enumerate LDAP usernames. Attackers can send SMTP or IMAP AUTH PLAIN attempts and measure the extra LDAP bind latency to identify valid usernames for targeted password guessing.
https://github.com/foxcpp/maddy/security/advisories/GHSA-88mq-x5xv-cmrh
https://github.com/foxcpp/maddy/releases/tag/v0.9.7
https://github.com/foxcpp/maddy/commit/74feda19646b9d2af3429715265425777e6c2577
https://github.com/foxcpp/maddy/blob/v0.9.6/internal/auth/ldap/ldap.go#L271-L278