CVE-2020-1957: Improper Authentication in Apache Shiro

org.apache.shiro:shiro-core Updated 02 Oct 2025

Summary

07/05/2021
Yes i
Critical
9.8

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback