CVE-2020-1957: Improper Authentication in Apache Shiro
Summary
CVE-2020-1957: Improper Authentication in Apache Shiro. Affects org.apache.shiro:shiro-core versions < 1.5.2. Fixed in 1.5.2. How to fix ↓
Also tracked for
- shiro · Debian:11
The same CVE-2020-1957 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Apache Shiro is a powerful and flexible open-source security framework that provides authentication, authorization, cryptography, and session management capabilities for Java applications. It is widely used to secure web applications and services. The shiro-core package is a core component of Apache Shiro, responsible for handling authentication and authorization processes.
Vulnerability Detail
The vulnerability identified as CVE-2020-1957 in Apache Shiro versions prior to 1.5.2 affects the integration of Apache Shiro with Spring dynamic controllers. An attacker can exploit this vulnerability by sending a specially crafted request, which may lead to an authentication bypass. This means that an unauthorized user could potentially gain access to restricted resources or perform actions reserved for authenticated users. The vulnerability has a CVSSv3 severity score of 9.8 (Critical), indicating its high impact and ease of exploitation.
How To Fix
Latest published version: 3.0.1 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.5.2
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, developers can implement additional authentication checks within their Spring dynamic controllers to mitigate the risk of an authentication bypass. This can involve validating the user's credentials or session information before processing any sensitive requests. Here's an example of how to add an authentication check using Spring Security:
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
// Inside the controller method
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null || !authentication.isAuthenticated()) {
// Handle unauthorized access
}
Please note that this workaround should be considered temporary, and upgrading to the latest secure version is the recommended long-term solution.
Conclusion
In conclusion, CVE-2020-1957 is a critical vulnerability in Apache Shiro that allows for an authentication bypass. It is crucial to upgrade to shiro-core version 1.5.2 or later to mitigate this vulnerability. Developers can also implement temporary workarounds to add extra authentication checks. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.apache.shiro:shiro-core →
FAQ
Apache Shiro is an open-source security framework for Java applications, providing authentication, authorization, cryptography, and session management capabilities.
The shiro-core package is a core component of Apache Shiro responsible for handling authentication and authorization processes.
This vulnerability allows an attacker to bypass authentication in Apache Shiro, potentially granting unauthorized access to restricted resources or actions.
To fix this vulnerability, upgrade the shiro-core package to version 1.5.2 or later by updating the Maven dependency in your project's pom.xml file.
Yes, you can implement additional authentication checks within your Spring dynamic controllers to mitigate the risk of an authentication bypass. However, upgrading to the latest secure version is recommended.
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.shiro:shiro-core.