CVE-2026-129348
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-129348) has been identified in the PropertiesRealm of Apache Shiro, which allows users who were removed from the realm's properties file, or whose roles and permissions were narrowed in it, to keep their previous access after the file is reloaded. The removed accounts and the old permissions stay in effect until the application is restarted.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects all versions of Apache Shiro before 3.0.2.
Details
Module Info
- Product: Apache Shiro
- Affected packages:
org.apache.shiro:shiro-core - Affected versions: <3.0.2
- GitHub repository: https://github.com/apache/shiro
- Published packages: https://central.sonatype.com/artifact/org.apache.shiro/shiro-core
- Package manager: Maven
- Fixed in:
- OSS Apache Shiro 3.0.2
- NES for Apache Shiro 1.8.0-shiro-1.8.3 and 1.13.0-shiro-1.13.3
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. It applies only when PropertiesRealm loads its users and roles from a file (a resourcePath starting with file:). In that case the realm starts a background thread that checks the file's last-modified time every 10 seconds by default, and calls restart() when the file has changed:
private void restart() {
if (resourcePath == null || resourcePath.length() == 0) {
throw new IllegalStateException("The resourcePath property is not set. " +
"It must be set prior to this realm being initialized.");
}
if (log.isDebugEnabled()) {
log.debug("Loading user security information from file [" + resourcePath + "]...");
}
try {
destroy();
} catch (Exception e) {
//ignored
}
init();
}
destroy() only shuts down the reload scheduler, and init() reads the file again and passes the new user.* and role.* lines to processUserDefinitions() and processRoleDefinitions() in TextConfigurationRealm. Those methods look up each named account and role in the users and roles maps that SimpleAccountRealm keeps in memory and either update it or add a new one. An existing account is updated with addRole() and addObjectPermissions(), which add to what the account already holds. Nothing removes the entries loaded before the reload, and the cached authentication and authorization data is not cleared either.
As a result, a user whose user. line was deleted from the file can still log in with the old password and keeps the old roles, a user whose line now lists fewer roles keeps the roles and permissions that were taken away, and a role whose role. line was deleted keeps its permissions. An administrator who edits the file to revoke an account or narrow access, relying on the periodic reload, sees the change take no effect for those entries until the application restarts, so the revoked users can keep acting with privileges they should no longer have.
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.
Credits
- Joshua Rogers (finder)