CVE-2023-20860: Spring Framework Spring Framework Is Vulnerable To Vulnerability

CRITICAL
Advisory Identifier: GHSA-7phw-cxx7-q9vq
CVSS 9.1
Published
Advisory Summary

CVE-2023-20860 is a CRITICAL (CVSS 9.1) spring framework is vulnerable to vulnerability (General Security Weakness) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring framework is vulnerable to security bypass via mvcrequestmatcher pattern mismatch. Remediation is available by upgrading affected packages to version 6.0.7, 5.3.26.

CVE-2023-20860 at a Glance

CVE Identifier CVE-2023-20860
GHSA Identifier GHSA-7phw-cxx7-q9vq
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification General Security Weakness
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-20860

To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework:spring fixed: 6.0.7
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>6.0.7</version>
</dependency>
org.springframework:spring fixed: 5.3.26
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>5.3.26</version>
</dependency>
org.springframework:spring-webmvc fixed: 6.0.7
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>6.0.7</version>
</dependency>
org.springframework:spring-webmvc fixed: 5.3.26
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>5.3.26</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-20860, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.7), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 Spring MVC, and the potential for a security bypass.

CVE-2023-20860 Affected Spring Framework Versions

4 component(s)
Fixed Versions:
6.0.75.3.26
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring
Maven
≥ 6.0.0
< 6.0.7
6.0.7
org.springframework:spring
Maven
≥ 5.3.0
< 5.3.26
5.3.26
org.springframework:spring-webmvc
Maven
≥ 6.0.0
< 6.0.7
6.0.7
org.springframework:spring-webmvc
Maven
≥ 5.3.0
< 5.3.26
5.3.26

References

Frequently Asked Questions

What is CVE-2023-20860?
CVE-2023-20860 is a security vulnerability in Spring Framework involving Spring Framework is vulnerable to security bypass via mvcRequestMatcher pattern mismatch under General Security Weakness.
Which Spring Framework versions are affected?
Affected versions include releases prior to 6.0.7, 5.3.26 across affected packages: org.springframework:spring, org.springframework:spring-webmvc.
What version fixes CVE-2023-20860?
Upgrading to 6.0.7, 5.3.26 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring affected?
Yes, org.springframework:spring is affected in releases prior to 6.0.7, 5.3.26. Upgrade your dependency to 6.0.7, 5.3.26 or later.
Is spring-webmvc affected?
Yes, org.springframework:spring-webmvc is affected in releases prior to 6.0.7, 5.3.26. Upgrade your dependency to 6.0.7, 5.3.26 or later.
What is the CVSS score of CVE-2023-20860?
CVE-2023-20860 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-20860?
CVE-2023-20860 is classified under General Security Weakness.
How can I check Maven dependencies for CVE-2023-20860?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7phw-cxx7-q9vq",
  "modified" : "2025-09-23T19:54:01Z",
  "published" : "2023-03-28T00:34:28Z",
  "aliases" : [ "CVE-2023-20860" ],
  "summary" : "Spring Framework is vulnerable to security bypass via mvcRequestMatcher pattern mismatch",
  "details" : "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 Spring MVC, and the potential for a security bypass.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.26"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webmvc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webmvc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.26"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-20860"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/202fa5cdb3a3d0cfe6967e85fa167d978244f28a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230505-0006"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2023-20860"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-28T13:39:35Z",
    "nvd_published_at" : "2023-03-27T22:15:00Z"
  }
}