Loading...
Skip to main content

CVE-2022-22978 — Authorization bypass in...

CRITICAL

Authorization bypass in Spring Security

Published May 20, 2022Updated October 4, 2024Source: osv

Summary

In Spring Security versions 5.5.6 and 5.5.7 and older unsupported versions, RegexRequestMatcher can easily be misconfigured to be bypassed on some servlet containers. Applications using RegexRequestMatcher with `.` in the regular expression are possibly vulnerable to an authorization bypass.

Advisory Timeline

  • First published May 20, 2022 (1606 days ago).
  • Last revised October 4, 2024 — 869 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update org.springframework.security:spring-security-core to 5.6.4 or later
<!-- Update pom.xml dependency version to 5.6.4 for org.springframework.security:spring-security-core -->
Maven
Update org.springframework.security:spring-security-web to 5.4.11 or later
<!-- Update pom.xml dependency version to 5.4.11 for org.springframework.security:spring-security-web -->
Maven
Update org.springframework.security:spring-security-core to 5.4.11 or later
<!-- Update pom.xml dependency version to 5.4.11 for org.springframework.security:spring-security-core -->
Maven
Update org.springframework.security:spring-security-web to 5.5.7 or later
<!-- Update pom.xml dependency version to 5.5.7 for org.springframework.security:spring-security-web -->
Maven
Update org.springframework.security:spring-security-web to 5.6.4 or later
<!-- Update pom.xml dependency version to 5.6.4 for org.springframework.security:spring-security-web -->
Maven
Update org.springframework.security:spring-security-core to 5.5.7 or later
<!-- Update pom.xml dependency version to 5.5.7 for org.springframework.security:spring-security-core -->

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: maven (2).

PackageEcosystemAffectedFixed In
org.springframework.security:spring-security-core
maven
5.6.0, 5.6.1, 5.6.2, 5.6.35.6.4
org.springframework.security:spring-security-web
maven
3.0.0.RELEASE, 3.0.1.RELEASE, 3.0.2.RELEASE, 3.0.3.RELEASE (+131 more)5.4.11
org.springframework.security:spring-security-core
maven
2.0.0, 2.0.1, 2.0.2, 2.0.3 (+140 more)5.4.11
org.springframework.security:spring-security-web
maven
5.5.0, 5.5.1, 5.5.2, 5.5.3 (+3 more)5.5.7
org.springframework.security:spring-security-web
maven
5.6.0, 5.6.1, 5.6.2, 5.6.35.6.4
org.springframework.security:spring-security-core
maven
5.5.0, 5.5.1, 5.5.2, 5.5.3 (+3 more)5.5.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-285
    Improper AuthorizationMITRE
  • CWE-863
    Incorrect AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2022-22978?
Authorization bypass in Spring Security This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2022-22978?
CVE-2022-22978 affects org.springframework.security:spring-security-core and org.springframework.security:spring-security-web. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-22978 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-hh32-7344-cg2f

Related CVEs

  • CVE-2023-34034
    CRITICAL

    Access Control Bypass in Spring Security

  • CVE-2025-41232
    CRITICAL

    Spring Security authorization bypass for method security annotations on private methods

  • CVE-2024-38821
    CRITICAL

    Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications

  • CVE-2026-22732
    CRITICAL

    Spring Security HTTP Headers Are not Written Under Some Conditions

  • CVE-2022-31692
    CRITICAL

    Spring Security authorization rules can be bypassed via forward or include dispatcher types

  • CVE-2018-1260
    CRITICAL

    Spring Security OAuth vulnerable to remote code execution (RCE)

  • CVE-2026-41003
    HIGH

    Spring Security SAML2 Service Provider: RelyingPartyRegistration may run arbitrary code on HTML forms generated by Spring Security filters

  • CVE-2026-40988
    HIGH

    Spring Security SAML2 Service Provider: Unbounded writer inflates the compressed SAML payload into memory (DoS)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies