CVE-2023-20883: Spring Framework Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-xf96-w227-r7c4
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2023-20883 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring boot welcome page denial of service. Remediation is available by upgrading affected packages to version 3.0.7, 2.7.12, 2.6.15, 2.5.15.

CVE-2023-20883 at a Glance

CVE Identifier CVE-2023-20883
GHSA Identifier GHSA-xf96-w227-r7c4
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-20883

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.boot:spring-boot-autoconfigure fixed: 3.0.7
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-autoconfigure</artifactId>
    <version>3.0.7</version>
</dependency>
org.springframework.boot:spring-boot-autoconfigure fixed: 2.7.12
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-autoconfigure</artifactId>
    <version>2.7.12</version>
</dependency>
org.springframework.boot:spring-boot-autoconfigure fixed: 2.6.15
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-autoconfigure</artifactId>
    <version>2.6.15</version>
</dependency>
org.springframework.boot:spring-boot-autoconfigure fixed: 2.5.15
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-autoconfigure</artifactId>
    <version>2.5.15</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.boot

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.springframework.boot

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 3.0.7), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.boot 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 CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

In Spring Boot versions 3.0.0 - 3.0.6, 2.7.0 - 2.7.11, 2.6.0 - 2.6.14, 2.5.0 - 2.5.14 and older unsupported versions, there is potential for a denial-of-service (DoS) attack if Spring MVC is used together with a reverse proxy cache. Specifically, an application is vulnerable if all of the conditions are true: * The application has Spring MVC auto-configuration enabled. This is the case by default if Spring MVC is on the classpath. * The application makes use of Spring Boot's welcome page support, either static or templated. * Your application is deployed behind a proxy which caches 404 responses. Your application is NOT vulnerable if any of the following are true: * Spring MVC auto-configuration is disabled. This is true if WebMvcAutoConfiguration is explicitly excluded, if Spring MVC is not on the classpath, or if spring.main.web-application-type is set to a value other than SERVLET. * The application does not use Spring Boot's welcome page support. * You do not have a proxy which caches 404 responses. Affected Spring Products and Versions Spring Boot 3.0.0 to 3.0.6 2.7.0 to 2.7.11 2.6.0 to 2.6.14 2.5.0 to 2.5.14 Older, unsupported versions are also affected Mitigation Users of affected versions should apply the following mitigations: * 3.0.x users should upgrade to 3.0.7+ * 2.7.x users should upgrade to 2.7.12+ * 2.6.x users should upgrade to 2.6.15+ * 2.5.x users should upgrade to 2.5.15+ Users of older, unsupported versions should upgrade to 3.0.7+ or 2.7.12+. Workarounds: configure the reverse proxy not to cache 404 responses and/or not to cache responses to requests to the root (/) of the application.

CVE-2023-20883 Affected Spring Framework Versions

4 component(s)
Fixed Versions:
3.0.72.7.122.6.152.5.15
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.boot:spring-boot-autoconfigure
Maven
≥ 3.0.0
< 3.0.7
3.0.7
org.springframework.boot:spring-boot-autoconfigure
Maven
≥ 2.7.0
< 2.7.12
2.7.12
org.springframework.boot:spring-boot-autoconfigure
Maven
≥ 2.6.0
< 2.6.15
2.6.15
org.springframework.boot:spring-boot-autoconfigure
Maven
< 2.5.15
2.5.15

References

Frequently Asked Questions

What is CVE-2023-20883?
CVE-2023-20883 is a security vulnerability in Spring Framework involving Spring Boot Welcome Page Denial of Service under CWE-400: Uncontrolled Resource Consumption.
Which Spring Framework versions are affected?
Affected versions include releases prior to 3.0.7, 2.7.12, 2.6.15, 2.5.15 across affected packages: org.springframework.boot:spring-boot-autoconfigure.
What version fixes CVE-2023-20883?
Upgrading to 3.0.7, 2.7.12, 2.6.15, 2.5.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-boot-autoconfigure affected?
Yes, org.springframework.boot:spring-boot-autoconfigure is affected in releases prior to 3.0.7, 2.7.12, 2.6.15, 2.5.15. Upgrade your dependency to 3.0.7, 2.7.12, 2.6.15, 2.5.15 or later.
What is the CVSS score of CVE-2023-20883?
CVE-2023-20883 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-20883?
CVE-2023-20883 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2023-20883?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.boot'. 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-xf96-w227-r7c4",
  "modified" : "2023-06-08T16:33:52Z",
  "published" : "2023-05-26T18:30:21Z",
  "aliases" : [ "CVE-2023-20883" ],
  "summary" : "Spring Boot Welcome Page Denial of Service",
  "details" : "In Spring Boot versions 3.0.0 - 3.0.6, 2.7.0 - 2.7.11, 2.6.0 - 2.6.14, 2.5.0 - 2.5.14 and older unsupported versions, there is potential for a denial-of-service (DoS) attack if Spring MVC is used together with a reverse proxy cache.\n\nSpecifically, an application is vulnerable if all of the conditions are true:\n\n* The application has Spring MVC auto-configuration enabled. This is the case by default if Spring MVC is on the classpath.\n* The application makes use of Spring Boot's welcome page support, either static or templated.\n* Your application is deployed behind a proxy which caches 404 responses.\n\nYour application is NOT vulnerable if any of the following are true:\n\n* Spring MVC auto-configuration is disabled. This is true if WebMvcAutoConfiguration is explicitly excluded, if Spring MVC is not on the classpath, or if spring.main.web-application-type is set to a value other than SERVLET.\n* The application does not use Spring Boot's welcome page support.\n* You do not have a proxy which caches 404 responses.\n\n\nAffected Spring Products and Versions\n\nSpring Boot\n\n3.0.0 to 3.0.6 2.7.0 to 2.7.11 2.6.0 to 2.6.14 2.5.0 to 2.5.14\n\nOlder, unsupported versions are also affected\nMitigation\n\nUsers of affected versions should apply the following mitigations:\n\n* 3.0.x users should upgrade to 3.0.7+\n* 2.7.x users should upgrade to 2.7.12+\n* 2.6.x users should upgrade to 2.6.15+\n* 2.5.x users should upgrade to 2.5.15+\n\nUsers of older, unsupported versions should upgrade to 3.0.7+ or 2.7.12+.\n\nWorkarounds: configure the reverse proxy not to cache 404 responses and/or not to cache responses to requests to the root (/) of the application.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-autoconfigure"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-autoconfigure"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-autoconfigure"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-autoconfigure"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-20883"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/issues/35552"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/commit/418dd1ba5bdad79b55a043000164bfcbda2acd78"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-boot"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/releases/tag/v2.5.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/releases/tag/v2.6.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/releases/tag/v2.7.12"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230703-0008"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2023-20883"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-26T22:09:06Z",
    "nvd_published_at" : "2023-05-26T17:15:14Z"
  }
}