CVE-2024-22271: Spring Framework Denial of Service Vulnerability
HIGHCVE-2024-22271 is a HIGH (CVSS 8.2) denial of service vulnerability (CWE-20: Improper Input Validation) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring cloud function framework vulnerable to denial of service. Remediation is available by upgrading affected packages to version 4.0.8, 4.1.2.
CVE-2024-22271 at a Glance
Security Impact
CVSS: 8.2
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:L/A:H).
How to Fix CVE-2024-22271
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.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-context</artifactId>
<version>4.0.8</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-context</artifactId>
<version>4.1.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.springframework.cloud
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-22271, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.springframework.cloud
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 4.0.8), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.springframework.cloud 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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
CVE-2024-22271 Affected Spring Framework Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.springframework.cloud:spring-cloud-function-context
|
Maven |
≥ 4.0.0
< 4.0.8
|
4.0.8
|
|
org.springframework.cloud:spring-cloud-function-context
|
Maven |
≥ 4.1.0
< 4.1.2
|
4.1.2
|
References
Frequently Asked Questions
What is CVE-2024-22271?
Which Spring Framework versions are affected?
What version fixes CVE-2024-22271?
Is spring-cloud-function-context affected?
What is the CVSS score of CVE-2024-22271?
What CWE is associated with CVE-2024-22271?
How can I check Maven dependencies for CVE-2024-22271?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j4r7-p9fp-w3f3",
"modified" : "2024-07-09T21:13:48Z",
"published" : "2024-07-09T15:30:53Z",
"aliases" : [ "CVE-2024-22271" ],
"summary" : "Spring Cloud Function Framework vulnerable to Denial of Service",
"details" : "In Spring Cloud Function framework, versions 4.1.x prior to 4.1.2, 4.0.x prior to 4.0.8 an application is vulnerable to a DOS attack when attempting to compose functions with non-existing functions.\n\nSpecifically, an application is vulnerable when all of the following are true:\n\nUser is using Spring Cloud Function Web module\n\nAffected Spring Products and Versions Spring Cloud Function Framework 4.1.0 to 4.1.2 4.0.0 to 4.0.8\n\nReferences https://spring.io/security/cve-2022-22979 https://checkmarx.com/blog/spring-function-cloud-dos-cve-2022-22979-and-unintended-function-invocation/ History 2020-01-16: Initial vulnerability report published.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.cloud:spring-cloud-function-context"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.cloud:spring-cloud-function-context"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "4.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22271"
}, {
"type" : "WEB",
"url" : "https://github.com/spring-cloud/spring-cloud-function/issues/1139"
}, {
"type" : "WEB",
"url" : "https://github.com/spring-cloud/spring-cloud-function/commit/59fe298b67fcb9249db727a7b3a33612fc7a9f75"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spring-cloud/spring-cloud-function"
}, {
"type" : "WEB",
"url" : "https://github.com/spring-cloud/spring-cloud-function/releases/tag/v4.1.2"
}, {
"type" : "WEB",
"url" : "https://spring.io/security/cve-2024-22271"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-09T21:13:48Z",
"nvd_published_at" : "2024-07-09T13:15:09Z"
}
}