CVE-2017-8046: Spring Framework Remote Code Execution Vulnerability
CRITICALCVE-2017-8046 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-20: Improper Input Validation) affecting Spring Framework libraries in the Maven ecosystem. The issue involves remote code execution in patch requests in spring data rest. Remediation is available by upgrading affected packages to version 2.6.9.RELEASE, 3.0.1.RELEASE.
CVE-2017-8046 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-8046
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.data</groupId>
<artifactId>spring-data-rest-core</artifactId>
<version>2.6.9.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-core</artifactId>
<version>3.0.1.RELEASE</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.data
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2017-8046, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.springframework.data
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 2.6.9.RELEASE), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.springframework.data 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-2017-8046 Affected Spring Framework Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.springframework.data:spring-data-rest-core
|
Maven |
< 2.6.9.RELEASE
|
2.6.9.RELEASE
|
|
org.springframework.data:spring-data-rest-core
|
Maven |
≥ 3.0.0
< 3.0.1.RELEASE
|
3.0.1.RELEASE
|
References
Frequently Asked Questions
What is CVE-2017-8046?
Which Spring Framework versions are affected?
What version fixes CVE-2017-8046?
Is spring-data-rest-core affected?
What is the CVSS score of CVE-2017-8046?
What CWE is associated with CVE-2017-8046?
How can I check Maven dependencies for CVE-2017-8046?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9qf9-28h9-hqcj",
"modified" : "2022-11-04T18:40:40Z",
"published" : "2022-05-13T01:02:43Z",
"aliases" : [ "CVE-2017-8046" ],
"summary" : "Remote code execution in PATCH requests in Spring Data REST",
"details" : "Malicious PATCH requests submitted to servers using Spring Data REST versions prior to 2.6.9 (Ingalls SR9), versions prior to 3.0.1 (Kay SR1) can use specially crafted JSON data to run arbitrary Java code.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.data:spring-data-rest-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.6.9.RELEASE"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.data:spring-data-rest-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.1.RELEASE"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-8046"
}, {
"type" : "WEB",
"url" : "https://github.com/spring-projects/spring-data-rest/issues/1487"
}, {
"type" : "WEB",
"url" : "https://github.com/spring-projects/spring-data-rest/issues/1520"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2405"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1553024"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spring-projects/spring-data-rest"
}, {
"type" : "WEB",
"url" : "https://jira.spring.io/browse/DATAREST-1127?redirect=false"
}, {
"type" : "WEB",
"url" : "https://pivotal.io/security/cve-2017-8046"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-04T18:40:40Z",
"nvd_published_at" : "2018-01-04T06:29:00Z"
}
}