Apache Shiro: DefaultLdapRealm accepts any password when authentication caching is enabled
- State
- Published
- Severity
- 9.1 Critical
- Published
- Nov 15, 2026
- Updated
- Nov 17, 2026
- Reserved
- Nov 14, 2026
Description
When authentication caching is enabled on DefaultLdapRealm, after a user logs in successfully once, subsequent logins for that user succeed with any password. A cached authentication skips the LDAP bind, and the AllowAllCredentialsMatcher installed by default in DefaultLdapRealm accepts any credentials, allowing an attacker who knows a valid username to authenticate as that user. This issue affects all Apache Shiro versions through 3.0.0, only when using DefaultLdapRealm (or JndiLdapRealm) with authenticationCachingEnabled set to true, which is not the default.
Mitigation: Upgrade to version 3.0.1 or later, which fixes the issue by no longer installing AllowAllCredentialsMatcher by default. Alternatively, disable authentication caching on the LDAP realm (this is the default), or configure a credentials matcher, such as SimpleCredentialsMatcher, that verifies credentials against the cached authentication info.
| Product | Versions |
|---|---|
| Apache Shiro Apache Software Foundation | before 3.0.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 9.1 Critical | apache |
Weaknesses
- CWE-287 Improper Authentication
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.