# CVE-2026-129349: Apache Shiro: DefaultLdapRealm accepts any password when authentication caching is enabled

> Attackers knowing a username can log in as that user with any password when LDAP caching is enabled in Apache Shiro.

- **Severity:** Critical 9.1 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/S:N/AU:Y/R:U/V:C/RE:L/U:Red`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** Yes (`DefaultLdapRealm`, `AllowAllCredentialsMatcher`)
- **Fix available:** No
- **Published:** 15 Nov 2026
- **Updated:** 17 Nov 2026
- **Also known as:** DEBIAN-CVE-2026-129349, GHSA-3j37-vw7v-fxxw, UBUNTU-CVE-2026-129349

## What is CVE-2026-129349?

CVE-2026-129349 is a critical authentication bypass vulnerability in Apache Shiro, published on 15 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2026-129349?

1 open source package ship an affected version, including org.apache.shiro:shiro-core.

An affected version is only exploitable if your software calls DefaultLdapRealm or AllowAllCredentialsMatcher. Many projects that include it are not exposed.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `org.apache.shiro:shiro-core` | Maven | `pkg:maven/org.apache.shiro/shiro-core` | All versions | 3.0.1 |

## How do I fix CVE-2026-129349?

Upgrade org.apache.shiro:shiro-core to 3.0.1 or later.

## Is CVE-2026-129349 being exploited?

There is no known exploitation of CVE-2026-129349 in the wild and no public exploit code.

Public exploit code:

- Apache Shiro <=3.0.0 DefaultLdapRealm + authenticationCachingEnabled: one valid login, then ANY password (incl. empty) authenticates — cached auth skips the LDAP bind and AllowAllCredentialsMatcher accepts everything. Real realm + real in-memory LDAP; only diff is shiro 3.0.0 vs fixed 3.0.1. (github_poc): https://github.com/googlesky/CVE-2026-129349

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-129349 and fix it if it is affected.

What it is: CVE-2026-129349 is a critical authentication bypass vulnerability in Apache Shiro, published on 15 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-129349 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software calls DefaultLdapRealm or AllowAllCredentialsMatcher. Many projects that include it are not exposed.

Affected packages and fixed versions:
- org.apache.shiro:shiro-core (Maven): affected all versions; fixed in 3.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
   If an affected version is present, also search the code for calls to DefaultLdapRealm or AllowAllCredentialsMatcher and report whether any exist.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-129349/ (Markdown: https://insights.sbomify.com/CVE-2026-129349/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-129349
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-129349
- OSV: https://osv.dev/vulnerability/CVE-2026-129349

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-129349/
Summaries are generated and may contain mistakes; the official description above is the record.
