Security Bypass Vulnerability in Spring Framework

libspring-java Updated 02 Oct 2025

Summary

27/03/2023
N/A
No i
High
7.5

CVE-2023-20860: Spring Framework running version 6.0.0 - 6.0.6 or 5.3.0 - 5.3.25 using "**" as a pattern in Spring Security configuration with the mvcRequestMatcher creates a mismatch in pattern matching between Spring Security and Spri... Affects libspring-java versions >= 5acffaa72da10ba42fe547eeea44d8615cbf99b9, < 3540029931c957b646fe219e6c3e713f044ee767. No fix is published. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Spring Framework is a popular open-source application framework for Java. It provides comprehensive infrastructure support for developing Java applications. The framework offers various modules, including Spring Security, which provides authentication and authorization features. The vulnerability affects versions 6.0.0 - 6.0.6 and 5.3.0 - 5.3.25 of the Spring Framework. This vulnerability specifically impacts the Spring Security configuration when using the "**" pattern with the mvcRequestMatcher. The mismatch in pattern matching between Spring Security and Spring MVC can lead to a security bypass.

Vulnerability Detail

The vulnerability (CVE-2023-20860) arises due to the incorrect pattern matching behavior in Spring Security configuration. When the "**" pattern is used with the mvcRequestMatcher, it creates a mismatch between Spring Security and Spring MVC. This mismatch can potentially allow an attacker to bypass security measures. By exploiting this vulnerability, an attacker may gain unauthorized access to protected resources or perform actions that should be restricted. The severity of this vulnerability is rated as high, with a CVSS score of 7.5.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, if upgrading to the patched version is not immediately feasible, it is recommended to avoid using the "**" pattern with the mvcRequestMatcher in the Spring Security configuration. Instead, consider using more specific patterns that accurately match the desired endpoints. By using precise patterns, the mismatch issue can be mitigated.

Conclusion

The security bypass vulnerability in the Spring Framework can lead to unauthorized access and restricted actions. It is crucial to upgrade to the patched versions or apply the recommended workaround to mitigate the risk. Regularly updating the Spring Framework is essential to ensure protection against security vulnerabilities. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libspring-java →

Share this vulnerability

FAQ

This vulnerability can potentially allow an attacker to bypass security measures and gain unauthorized access to protected resources or perform restricted actions.

Versions 6.0.0 - 6.0.6 and 5.3.0 - 5.3.25 of the Spring Framework are affected by this vulnerability.

To fix this vulnerability, it is recommended to upgrade to the patched versions 6.0.7+ or 5.3.26+ of the Spring Framework.

As a workaround, you can avoid using the "**" pattern with the mvcRequestMatcher in the Spring Security configuration and opt for more specific patterns.

The severity of this vulnerability is rated as high, with a CVSS score of 7.5.

Related vulnerabilities

Recent vulnerabilities recorded for libspring-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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