Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/googlesky/cve-2026-129349
Vulnerability AnalysisExploitationWeb SecurityAuthenticationLabs & Practice
GitHubgooglesky/cve-2026-129349

CVE-2026-129349

Differential PoC lab for CVE-2026-129349: Apache Shiro DefaultLdapRealm with authentication caching accepts any password after one valid login. Includes check, exploit, and probe modes.

View Repository
44 days agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-129349 — Apache Shiro DefaultLdapRealm accepts any password after one successful login when authentication caching is enabled

License: MIT Research status: validated

CVECVE-2026-129349
ComponentApache Shiro DefaultLdapRealm (also JndiLdapRealm), core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java
Affectedall Apache Shiro versions through 3.0.0, only with DefaultLdapRealm/JndiLdapRealm and authenticationCachingEnabled = true (not the default)
Fixed in3.0.1 — DefaultLdapRealm's constructor no longer installs AllowAllCredentialsMatcher by default
CWECWE-287 (Improper Authentication), CWE-613 (Insufficient Session Expiration analog: stale cached authentication)
ImpactAuthentication bypass: an attacker who knows (or guesses) any valid username can authenticate as that user with an arbitrary password — including the empty string — after that user has logged in once
VectorAny authentication path backed by the affected realm configuration; network position is whatever reaches the application
Triggerone valid login primes the authentication cache; every subsequent UsernamePasswordToken for the same user is accepted without an LDAP bind because the cached AuthenticationInfo is matched by AllowAllCredentialsMatcher
CreditApache Shiro security announcement (ASF thread 1whn52ht402lhc782c3s843c9hho8b4y)

Apache Shiro's DefaultLdapRealm historically installed AllowAllCredentialsMatcher in its constructor — "credentials matching is not necessary, the LDAP directory will do it automatically". That reasoning holds only while every authentication performs an LDAP bind. When authenticationCachingEnabled = true, a cached authentication skips the bind entirely and the matcher runs alone — and a matcher that accepts anything turns the cache into an open door. The upstream fix (shiro-root-3.0.0...shiro-root-3.0.1) is exactly two deleted lines:

 public DefaultLdapRealm() {
-    //Credentials Matching is not necessary - the LDAP directory will do it automatically:
-    setCredentialsMatcher(new AllowAllCredentialsMatcher());
     //Any Object principal and Object credentials may be passed to the LDAP provider, so accept any token:
     setAuthenticationTokenClass(AuthenticationToken.class);

This laboratory runs the real DefaultLdapRealm (vulnerable 3.0.0 vs fixed 3.0.1, the only difference between the two builds) against a real in-memory LDAP directory (UnboundID LDAP SDK) with a real cache manager — precisely the advisory's configuration — and proves the bypass end-to-end.


1. Root cause

Shiro's AuthenticatingRealm.getAuthenticationInfo(token) resolves authentication through a cache first:

AuthenticationInfo info = getCachedAuthenticationInfo(token);   // cache hit → no LDAP bind
if (info == null) {
    info = doGetAuthenticationInfo(token);                      // the LDAP bind
    cacheAuthenticationInfo(token, info);                       // prime the cache
}
assertCredentialsMatch(token, info);                            // ← the only remaining check

With DefaultLdapRealm through 3.0.0, assertCredentialsMatch consults the constructor-installed AllowAllCredentialsMatcher, whose doCredentialsMatch returns true unconditionally. Consequences, all reproduced in this lab:

  • the first login still performs an LDAP bind — a wrong password fails (the directory rejects the bind);
  • one valid login stores AuthenticationInfo in the cache;
  • every subsequent login for that user skips the bind and is accepted with any credentials — the empty string included;
  • clearing the cache (or restarting) restores bind semantics until the next valid login.

The precondition is explicit: authenticationCachingEnabled is not the default, exactly as the advisory states ("only when using DefaultLdapRealm (or JndiLdapRealm) with authenticationCachingEnabled set to true, which is not the default"). Deployments that enable it — a common performance choice — carry the bypass.

2. Reproduction environment

serviceimagerole
shiro-vulncve-2026-129349:vulnshiro-core 3.0.0 — the realm installs AllowAllCredentialsMatcher
shiro-fixedcve-2026-129349:fixedshiro-core 3.0.1 — the constructor no longer installs it (SimpleCredentialsMatcher from the base class applies)
poccve-2026-129349-poc:localstdlib-only Python driver

Each service is a single Java process that starts (1) an UnboundID in-memory LDAP directory (dc=lab, ou=people, uid=alice with a seeded password, bind-DN authentication) and (2) an HTTP endpoint (/login?username=&password=) that calls the real realm.getAuthenticationInfo(new UsernamePasswordToken(...)). The realm is configured exactly per the advisory: DefaultLdapRealm + JndiLdapContextFactory (ldap://127.0.0.1:1389) + MemoryConstrainedCacheManager + authenticationCachingEnabled(true). The two images differ only in the shiro.version Maven property.

3. Running the environment

./run-lab.sh build     # compiles the service against 3.0.0 and 3.0.1
./run-lab.sh up        # cve129349lab network, shiro-vuln, shiro-fixed
./run-lab.sh sweep     # check / exploit / probe / mitigation on both sides
./run-lab.sh down

Single mode against one side:

podman run --rm --network cve129349lab cve-2026-129349-poc:local \
    exploit --host=shiro-vuln

4. The PoC

poc/poc.py (stdlib only):

  • check — wrong password before any valid login (fails), valid login (succeeds), wrong password after (the classification). Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — primes the cache with the valid password, then authenticates as the user with wrong-password, x, the empty string, and 0; reports each accepted junk credential.
  • probe — cache-state matrix: cold cache, warm cache, empty credentials, unknown principal, repeated valid login, and post-reset behaviour.
  • mitigation — the vendor fix is the 3.0.1 upgrade (this lab's fixed side); the advisory's configuration-level alternative is not enabling authentication caching on the affected realms.

5. Expected results

runshiro-vuln (3.0.0)shiro-fixed (3.0.1)
check wrong pw before valid loginfalse (LDAP bind rejects)false
check valid logintruetrue
check wrong pw after valid logintrue — bypassfalse (IncorrectCredentialsException)
exploit junk passwordswrong-password, x, ``, 0 all acceptednone accepted
probe empty password, warm cachetruefalse
probe unknown userfalse (no cache entry → bind fails)false
probe wrong pw after /resetfalse (cold cache again)false
reported matcherAllowAllCredentialsMatcherSimpleCredentialsMatcher

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • Podman (or Docker) with network-creation rights; every container is resource-bounded on the isolated cve129349lab network.
  • Outbound HTTPS at image build (Maven Central: shiro-core 3.0.0/3.0.1, unboundid-ldapsdk).

7. Additional findings (0-day sweep on the fixed line)

Download Tool