Apache Shiro CVE-2026-129349 (CVSS 9.1): LDAP Realm Accepts Any Password Once Auth Caching Is On — Eight Flaws Fixed, Update to 3.0.2

DevSecOps · 2026-11-16 · By H.A

Apache Shiro CVE-2026-129349 (CVSS 9.1): LDAP Realm Accepts Any Password Once Auth Caching Is On — Eight Flaws Fixed, Update to 3.0.2

Apache Shiro's LDAP realm lets anyone who knows a valid username log in with any password when authentication caching is enabled, one of eight flaws fixed in Shiro 3.0.1 and 3.0.2, with a public proof-of-concept lab already online.

What Happened

The Apache Shiro project has published eight security advisories in one batch for its widely used Java security framework. The most serious one is CVE-2026-129349 (CVSS 4.0 score 9.1, critical). In a specific but realistic setup, Shiro's LDAP realm will accept any password for a user who has already logged in once.

The advisories went out on the oss-security mailing list at 09:37 Mauritius time (05:37 UTC) on Saturday 14 November 2026. The CVE record and the NVD entry for CVE-2026-129349 followed on 15 November. The fixes are split across two releases:

Both versions are on Maven Central. The simplest action for every Shiro user is to move straight to 3.0.2.

There are no reports of exploitation in the wild, and none of the flaws is in CISA's Known Exploited Vulnerabilities catalog. However, a public GitHub repository now offers a Docker lab and a proof-of-concept driver that runs Shiro 3.0.0 against an in-memory LDAP directory to show the bypass. Anyone can now reproduce the bug.

Technical Details: CVE-2026-129349

Shiro's DefaultLdapRealm normally proves a password by binding to the LDAP directory with the credentials the user typed. If the bind succeeds, the password is right. Because the directory does the real check, the realm installs AllowAllCredentialsMatcher by default. That matcher does no checking of its own and approves whatever it is given.

The problem appears when an administrator turns on authentication caching (authenticationCachingEnabled = true) on DefaultLdapRealm or JndiLdapRealm, usually to reduce load on the directory server. According to the vendor advisory:

As a result, an attacker who knows a valid username, such as an email address, an employee ID or admin, can log in as that user with any password, as long as the user's entry is still in the cache. The CVSS vector reflects this: network attack, low complexity, no privileges, no user interaction, high impact on confidentiality and integrity. The "attack requirements present" flag (AT:P) records the precondition that caching must be enabled.

Caching is off by default, which limits how many systems are affected. Even so, caching LDAP lookups is a common performance tweak in enterprise single sign-on, admin consoles and internal portals, which are exactly the applications that use LDAP-backed Shiro. Shiro 3.0.1 removes the default AllowAllCredentialsMatcher from the realm.

The Other Seven Flaws

None of the rest is critical, but several affect authentication or authorization:

AI Found Part of the Batch

The credits stand out. Two of the low-severity issues, the principal-tag XSS and the empty-password match, are credited to the Apache Software Foundation itself, which found them with LLM-based security scanning ("Claude agents" in the XSS advisory) and then had the Shiro team validate them. The critical LDAP bug is credited to researcher Joshua Rogers, who also appears on four other advisories in the batch. Shiro maintainer Lenny Primak developed all of the fixes.

This is the latest example of open-source projects receiving a wave of reports from AI-assisted code review. Most findings are minor. This time, the same audit cycle also produced a 9.1 authentication bypass.

Who Is Affected

What To Do Now

# Which Shiro version is on the classpath?
mvn dependency:tree | grep org.apache.shiro
./gradlew dependencies | grep org.apache.shiro

# Is LDAP auth caching enabled anywhere?
grep -RniE "authenticationCachingEnabled|LdapRealm" --include=*.ini --include=*.java --include=*.xml --include=*.properties --include=*.yml .

Why It Matters

Shiro has a long history of serious bugs, from the RememberMe deserialization flaw (Shiro-550) to repeated path-matching bypasses, and it is still embedded in many enterprise Java products. CVE-2026-129349 needs an opt-in setting to be dangerous. But a bug that turns "log in as anyone whose username you know" into a single request, with a public lab to practise on, is the kind that gets weaponized against internet-facing admin panels. If LDAP caching is enabled anywhere in your environment, treat this as urgent.

Sources

REEF SENTINEL