Miggo Logo

CVE-2020-1957:
Improper Authentication in Apache Shiro

9.8

CVSS Score

Basic Information

EPSS Score
-
Published
5/7/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.shiro:shiro-coremaven< 1.5.21.5.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from mismatches between Shiro's path matching implementation and Spring's controller routing when handling dynamic controllers. Key functions in the authentication flow include:

  1. AntPathMatcher.match(): Responsible for pattern matching security rules against request paths. The pre-1.5.2 implementation failed to properly handle edge cases like semicolons in paths.
  2. PathMatchingFilterChainResolver.getChain(): Determines which security filters apply to a request. Improper path matching here allowed crafted URLs to skip authentication requirements. The confidence is high because:
  • The CVE description explicitly mentions Spring dynamic controller context
  • Authentication bypass patterns align with known AntPathMatcher limitations
  • Shiro 1.5.2 release notes mention 'path pattern matching improvements'
  • Similar historical vulnerabilities (CVE-2020-11989) involved path normalization in these components

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*p**** S*iro ***or* *.*.*, w**n usin* *p**** S*iro wit* Sprin* *yn*mi* *ontroll*rs, * sp**i*lly *r**t** r*qu*st m*y **us* *n *ut**nti**tion *yp*ss.

Reasoning

T** vuln*r**ility st*ms *rom mism*t***s **tw**n S*iro's p*t* m*t**in* impl*m*nt*tion *n* Sprin*'s *ontroll*r routin* w**n **n*lin* *yn*mi* *ontroll*rs. K*y *un*tions in t** *ut**nti**tion *low in*lu**: *. *ntP*t*M*t***r.m*t**(): R*sponsi*l* *or p*tt*