LDAP Injection Affecting github.com/foxcpp/maddy/internal/auth/ldap package, versions >=0.5.0 <0.9.3


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.42% (36th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMFOXCPPMADDYINTERNALAUTHLDAP-16083672
  • published16 Apr 2026
  • disclosed13 Apr 2026
  • creditRealHurrison, Ghost1032

Introduced: 13 Apr 2026

CVE-2026-40193  (opens in a new tab)
CWE-90  (opens in a new tab)

How to fix?

Upgrade github.com/foxcpp/maddy/internal/auth/ldap to version 0.9.3 or higher.

Overview

Affected versions of this package are vulnerable to LDAP Injection through the Lookup and AuthPlain functions in internal/auth/ldap/ldap.go. An attacker can authenticate or enumerate accounts by supplying a username that contains LDAP filter metacharacters, causing the username to be interpolated into the search filter or DN template without being escaped. This lets the attacker alter the LDAP query used for account lookup and bind, which can result in unauthorized login to another account or denial of service for users whose names are parsed as part of the injected expression.

CVSS Base Scores

version 4.0
version 3.1