CVE-2022-22978: Authorization bypass in Spring Security

Summary

20/05/2022
Yes i
Critical
9.8

CVE-2022-22978: Authorization bypass in Spring Security. Affects org.springframework.security:spring-security-core across 3 version ranges.

< 5.4.11 >= 5.5.0, < 5.5.7 >= 5.6.0, < 5.6.4

Fixed in 5.4.11, 5.5.7 or 5.6.4, depending on the release line you run. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package under scrutiny is org.springframework.security:spring-security-core. This package is a part of the Spring Security framework, which provides authentication and authorization functionalities for Java applications. It is widely used to secure web applications and APIs. Spring Security Core is a core module of the framework that includes essential security features such as user authentication, access control, and session management. Unfortunately, versions 5.5.6 and 5.5.7, as well as older unsupported versions, are vulnerable to an authorization bypass.

Vulnerability Detail

The vulnerability in Spring Security versions 5.5.6 and 5.5.7 and older unsupported versions is an authorization bypass. It stems from a misconfiguration of the RegexRequestMatcher, which can be easily bypassed on certain servlet containers. Applications that use RegexRequestMatcher with a regular expression containing a dot (.) are potentially vulnerable. This vulnerability allows attackers to bypass authorization checks and gain unauthorized access to protected resources. The impact of this vulnerability can be severe, as it compromises the security of the application and exposes sensitive data or functionality to unauthorized users.

How To Fix

Latest published version: 7.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 5.4.11 5.4.11
  • >= 5.5.0, < 5.5.7 5.5.7
  • >= 5.6.0, < 5.6.4 5.6.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. The recommended approach is to upgrade to a fixed version of Spring Security.

Conclusion

In conclusion, the vulnerability identified as CVE-2022-22978 in org.springframework.security:spring-security-core versions 5.5.6 and 5.5.7 and older unsupported versions is an authorization bypass. It allows attackers to bypass authorization checks and gain unauthorized access to protected resources. To mitigate this vulnerability, it is crucial to upgrade to a fixed version of Spring Security and ensure the correct configuration of RegexRequestMatcher. Regularly updating dependencies and following secure coding practices is also essential. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.springframework.security:spring-security-core →

Share this vulnerability

FAQ

Spring Security is a framework that provides authentication and authorization functionalities for Java applications. It helps secure web applications and APIs by managing user authentication, access control, and session management.

This vulnerability allows attackers to bypass authorization checks and gain unauthorized access to protected resources. It compromises the security of the application and exposes sensitive data or functionality to unauthorized users.

Versions 5.5.6 and 5.5.7, as well as older unsupported versions, are affected by this vulnerability.

To fix this vulnerability, it is recommended to upgrade to a fixed version of Spring Security. For versions 5.5.6 and 5.5.7, the fixed version is 5.5.7. For older unsupported versions, it is advised to upgrade to a supported version.

There is no specific workaround provided for this vulnerability. The recommended approach is to upgrade to a fixed version of Spring Security.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.security:spring-security-core.

How To Fix

Latest published version: 7.2.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 5.4.11 5.4.11
  • >= 5.5.0, < 5.5.7 5.5.7
  • >= 5.6.0, < 5.6.4 5.6.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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