LDAP Injection
Description
Detects user input flowing to LDAP queries without proper escaping.
How to fix
Use ldap.EscapeFilter to sanitize user input before including in LDAP filters.
```go
escaped := ldap.EscapeFilter(username)
filter := fmt.Sprintf("(uid=%s)", escaped)
```
Learn more: https://shoulder.dev/learn/go/cwe-90/ldap-injection
Applies to
Languages
Scan for this issue
Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=go-ldap-injection .