CVE-2026-129347

Authorization Bypass
Affects
Apache Shiro
in
Apache Shiro
No items found.
Versions
<3.0.2

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Apache Shiro is an open-source Java security framework that performs authentication, authorization, cryptography, and session management for applications ranging from small mobile apps to large web and enterprise systems. It exposes a single Subject-centric API that applications use to log users in, check roles and permissions, and manage sessions independently of any servlet or EJB container, and integrates with common Java stacks through modules such as shiro-web, shiro-spring, and shiro-guice.

An authorization bypass vulnerability (CVE-2026-129347) has been identified in the DefaultPasswordService and SimpleCredentialsMatcher classes of Apache Shiro, which allows attackers to log in to an account whose stored credential is empty by submitting an empty password. The issue is only reachable when accounts with an empty stored credential exist.

Per OWASP: Confirmation of the user's identity, authentication, and session management is critical to protect against authentication-related attacks.

This issue affects all versions of Apache Shiro before 3.0.2.

Details

Module Info

Vulnerability Info

This Low-severity vulnerability is found in the org.apache.shiro:shiro-core package in all versions of Apache Shiro before 3.0.2.

Shiro compares a submitted password with the credential stored for the account in two places, and both treat an empty stored credential as a valid match for an empty submission. In DefaultPasswordService, both passwordsMatch overloads (the one taking a saved Hash and the one taking a saved String) special-case a missing or empty stored value and return true whenever the submitted plaintext is also null or empty:

public boolean passwordsMatch(Object plaintext, Hash saved) {
    ByteSource plaintextBytes = createByteSource(plaintext);

    if (saved == null || saved.isEmpty()) {
        return plaintextBytes == null || plaintextBytes.isEmpty();
    } else {
        if (plaintextBytes == null || plaintextBytes.isEmpty()) {
            return false;
        }
    }
    ...
}

public boolean passwordsMatch(Object submittedPlaintext, String saved) {
    ByteSource plaintextBytes = createByteSource(submittedPlaintext);

    if (saved == null || saved.length() == 0) {
        return plaintextBytes == null || plaintextBytes.isEmpty();
    }
    ...
}

SimpleCredentialsMatcher.equals, which realms use by default when no hashing matcher is configured, converts both credentials to byte arrays and compares them with no check on the stored side, so an empty stored credential and an empty submitted password produce two equal zero-length arrays:

protected boolean equals(Object tokenCredentials, Object accountCredentials) {
    ...
    if (isByteSource(tokenCredentials) && isByteSource(accountCredentials)) {
        byte[] tokenBytes = toBytes(tokenCredentials);
        byte[] accountBytes = toBytes(accountCredentials);
        return MessageDigest.isEqual(tokenBytes, accountBytes);
    } else {
        return accountCredentials.equals(tokenCredentials);
    }
}

As a result, any account whose stored password or hash is empty can be authenticated by anyone who knows its username and submits an empty password. A missing or empty stored credential should never match any submission.

Mitigation

Apache Shiro 1.x is End-of-Life and no longer receives open-source updates to address this issue. The final 1.x release was 1.13.0; as of February 28, 2024, Shiro v1 was superseded by v2.

Users of the affected components should apply one of the following mitigations:

  • Upgrade Apache Shiro to a currently supported release line that contains the fix, first shipped upstream in Apache Shiro 3.0.2 (requires Java 17+).
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Low
ID
CVE-2026-129347
PROJECT Affected
Apache Shiro
Versions Affected
<3.0.2
NES Versions Affected
Published date
November 18, 2026
≈ Fix date
November 18, 2026
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Apache Shiro
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.