Apache Shiro: Authorization annotations not always enforced, depending on where they are placed
- State
- Published
- Severity
- 6.3 Medium
- Published
- Nov 16, 2026
- Updated
- Nov 16, 2026
- Reserved
- Aug 15, 2026
Description
Authorization annotations, such as @RequiresRoles and @RequiresPermissions, are not always enforced in some class or interface hierarchies. Annotations declared on an interface were not enforced when using the shiro-guice, shiro-aspectj, shiro-cdi or shiro-jakarta-ee modules. In addition, annotations declared on a class or a superclass were not always enforced when using shiro-guice or shiro-aspectj, allowing an unauthorized caller to invoke methods that should be protected. This issue affects all Apache Shiro versions through 3.0.1, with impact depending on module and where annotations are declared.
Mitigation: Upgrade to version 3.0.2 or later, which fixes the issue. The annotation closest to the invoked method now takes precedence. Alternatively, declare authorization annotations directly on each protected implementing method.
| Product | Versions |
|---|---|
| Apache Shiro Apache Software Foundation | before 3.0.2 Affected |
| Apache Shiro Apache Software Foundation | before 3.0.2 Affected |
| Apache Shiro Apache Software Foundation | 2.0.0-alpha-0 to before 3.0.2 Affected |
| Apache Shiro Apache Software Foundation | 2.0.0-alpha-0 to before 3.0.2 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 6.3 Medium | apache |
Weaknesses
- CWE-862 Missing Authorization
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.