Summary
Traccar's LDAP login flow may accept an empty password and attempt an unauthenticated LDAP bind instead of rejecting the login. If LDAP authentication is enabled and the directory permits unauthenticated binds, an attacker who knows a valid username may obtain a session for that account, including an administrator account.
Affected context
The issue occurs in Traccar's LdapProvider.login() when LDAP authentication is enabled. It becomes risky when an empty password is not rejected before the LDAP bind and the configured directory allows unauthenticated binds. The described affected releases are Traccar 3.15 before 6.17.0.
Exploit preconditions
- Attack surface: Traccar session authentication through
POST /api/sessionor HTTP Basic authentication - Required access: No prior authentication; the attacker must know a valid username
- Trigger point: LDAP login handling with an empty password
- Why exploitation is possible: The login flow may perform an unauthenticated LDAP bind, and a directory that permits such binds may accept it without verifying a password
Why this happens
The login implementation does not reliably reject an empty password before attempting LDAP authentication. When the LDAP library or directory treats an empty-password bind as an unauthenticated bind, the application may mistake that result for successful authentication. This is an authentication-verification failure mapped to CWE-287: Improper Authentication.
Potential impact
- An attacker may obtain a session associated with a known username.
- Accounts with elevated privileges, including administrator accounts, could be accessed.
- Unauthorized access could expose or allow changes to data and application functions.
- Compromised accounts may be used for further activity within connected systems.
General mitigation guidance
Defensive patterns focus on rejecting invalid credentials before contacting the identity provider and ensuring that a successful bind represents verified user authentication.
- Reject empty or otherwise invalid passwords at the application boundary.
- Use LDAP authentication flows that explicitly verify credentials and distinguish unauthenticated binds from successful user authentication.
- Configure directories to disallow unauthenticated binds where they are not required.
- Apply least privilege to LDAP service accounts and limit the permissions available to authenticated application users.
- Treat usernames and other login inputs as untrusted, and enforce consistent authentication checks across all supported login methods.
How teams detect issues like this
- Review authentication code for missing empty-password checks before LDAP bind operations.
- Use static analysis or code review rules to flag authentication flows that treat a successful connection or bind as proof of user identity without checking the bind semantics.
- Monitor authentication logs for empty-password attempts, unusual LDAP bind patterns, and sessions created for sensitive accounts without expected credential verification.
- Enforce identity-provider policies that prohibit unauthenticated binds and alert on violations.

