Apache rated CVE-2026-129349 Critical, and the CVSS 4.0 score from the Apache CNA is 9.1 12. The flaw affects every Shiro version through 3.0.0, but only where an application uses DefaultLdapRealm or JndiLdapRealm with authenticationCachingEnabled set to true, which the project says is not the default 1. Version 3.0.1 fixes it by no longer installing AllowAllCredentialsMatcher on that realm by default 1.
A caching flag is a performance decision somebody made years ago, and the failure it produces looks like a working login. The advisory states the result: once a user logs in successfully, later logins for that user succeed with any password 1.
The bind is the check, and the cache skips it
DefaultLdapRealm authenticates by opening an LDAP connection with the submitted principal and credentials and letting the directory decide 3. When the connection succeeds, the realm builds an AuthenticationInfo containing that principal and those credentials, and with caching on it stores the entry under the submitted username 34.
On the next attempt, AuthenticatingRealm.getAuthenticationInfo reads the cache first. A hit means the realm never calls the LDAP lookup, and control moves to the credentials matcher 4. Skipping the directory round trip is the point of the cache.
The bug lives in the matcher’s behavior on a cache hit. The 3.0.0 constructor of DefaultLdapRealm installed AllowAllCredentialsMatcher, with a comment explaining that matching is unnecessary because the LDAP directory performs that check 3. On a cache hit, the directory performs nothing, and the matcher accepts whatever arrived 1.
The 3.0.1 constructor drops that line, so the realm inherits the framework default SimpleCredentialsMatcher 45. A cache hit now compares the submitted password against the one stored with the cached entry, and a wrong password fails.
The cache holds the password
DefaultLdapRealm.createAuthenticationInfo builds its AuthenticationInfo from the token that just logged in, credentials included 3. A cached entry therefore contains the plaintext password from the first successful login, sitting in whatever cache region the application configured.
Shiro’s class documentation warns about that. The AuthenticatingRealm comment says authentication caching is safe only when the cached credentials are hashed or encrypted, or when the cache region cannot spill to disk and will not carry entries over an unprotected network 4. The bundled MemoryConstrainedCacheManager keeps entries in a soft-reference map and, per the caching page, has no time-to-live or time-to-expire setting 6.
No expiry, a plaintext password, and a JVM that stays up for weeks add up to a second copy of an authentication decision that the directory no longer gets a vote on.
What evicts the entry
Logout is the eviction path the framework documents, and it carries a condition. Shiro clears a cached AuthenticationInfo during logout only when the key derived from the submitted token and the key derived from the authenticated principals are identical 4. With the default key both sides use the username, so a normal logout clears the entry.
The framework’s documentation records no equivalent hook for a credential change in the directory 4. The application writes the new password to LDAP, and the cached entry stays where it is until an eviction removes it. An application that wants a reset to take effect immediately has to clear that account’s cached entry through the realm, and I would want to see that call in the reset handler before I treated a reset as a revocation.
Restarting the JVM clears an in-memory cache. A distributed cache shared across application instances does not, which is why Shiro’s warning about networked cache regions matters here 46.
What I ask about a Java app that uses Shiro
Shiro ships as a library, so it has no version banner of its own. It arrives inside a WAR, a fat jar, or a container image, and the fix lands when whoever builds that artifact rebuilds it. The version question is a dependency question: the build file, the lockfile if one exists, and the jar inside the image that runs.
Then the configuration questions, in the order I would ask them:
- Is authentication caching enabled on any LDAP realm, and was it set explicitly or inherited from a shared config template?
- Which
CacheManagerbacks that cache, and does the implementation have a TTL? - Does the password reset path clear that account’s cached authentication entry, or does it only write to the directory?
- Do several application instances share one cache region?
The answer to that last question tells me how far a stale entry reaches. On a shared cache, a reset performed in the directory leaves the old entry valid in every instance that reads it, until the entry expires or an eviction removes it.
A vulnerability scanner covers the version and nothing else here. It reads the jar, reports 3.0.0, and moves on, while someone still has to open the realm configuration and find out whether the flag was ever set. That is the piece I would put in front of the application owner instead of a ticket in the patching queue.
Every version through 3.0.0 is affected, and the upgrade is the fix. Whether the cache was ever switched on sets the priority, and the version number cannot answer that.
-
Apache Software Foundation. (2026). Security reports. Apache Shiro. https://shiro.apache.org/security-reports.html ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
-
Apache Software Foundation. (2026, November 15). CVE-2026-129349 [CVE record]. CVE Program. https://www.cve.org/CVERecord?id=CVE-2026-129349 ↩︎
-
Apache Software Foundation. (2026). DefaultLdapRealm.java (Version 3.0.0) [Source code]. GitHub. https://github.com/apache/shiro/blob/shiro-root-3.0.0/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java ↩︎ ↩︎ ↩︎ ↩︎
-
Apache Software Foundation. (2026). AuthenticatingRealm.java (Version 3.0.0) [Source code]. GitHub. https://github.com/apache/shiro/blob/shiro-root-3.0.0/core/src/main/java/org/apache/shiro/realm/AuthenticatingRealm.java ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎
-
Apache Software Foundation. (2026). DefaultLdapRealm.java (Version 3.0.1) [Source code]. GitHub. https://github.com/apache/shiro/blob/shiro-root-3.0.1/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java ↩︎
-
Apache Software Foundation. (n.d.). Caching. Apache Shiro. https://shiro.apache.org/caching.html ↩︎ ↩︎