CVE-2017-12612: Spark core 2.11 Apache Spark Deserialization Of Untrusted Vulnerability
HIGHCVE-2017-12612 is a HIGH (CVSS 7.8) apache spark deserialization of untrusted vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Spark core 2.11 libraries in the Maven ecosystem. The issue involves apache spark deserialization of untrusted data vulnerability. Remediation is available by upgrading affected packages to version 2.1.2.
CVE-2017-12612 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-12612
To remediate this vulnerability, upgrade all affected Spark core 2.11 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.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>2.1.2</version>
</dependency>
pip install pyspark>=2.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.spark
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2017-12612, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.spark
Analyze the terminal output to locate any version of Spark core 2.11 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.spark 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Spark core 2.11, 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-12612 Affected Spark core 2.11 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.spark:spark-core_2.11
|
Maven |
< 2.1.2
|
2.1.2
|
|
org.apache.spark:spark-core_2.10
|
Maven |
< 2.1.2
|
2.1.2
|
|
pyspark
|
PyPI |
< 2.1.2
|
2.1.2
|
References
Frequently Asked Questions
What is CVE-2017-12612?
Which Spark core 2.11 versions are affected?
What version fixes CVE-2017-12612?
Is spark-core_2.11 affected?
Is spark-core_2.10 affected?
What is the CVSS score of CVE-2017-12612?
What CWE is associated with CVE-2017-12612?
How can I check Maven dependencies for CVE-2017-12612?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8rhc-48pp-52gr",
"modified" : "2024-11-26T18:49:56Z",
"published" : "2018-11-09T17:43:25Z",
"aliases" : [ "CVE-2017-12612" ],
"summary" : "Apache Spark Deserialization of Untrusted Data vulnerability",
"details" : "In Apache Spark 1.6.0 until 2.1.1, the launcher API performs unsafe deserialization of data received by its socket. This makes applications launched programmatically using the launcher API potentially vulnerable to arbitrary code execution by an attacker with access to any user account on the local machine. It does not affect apps run by spark-submit or spark-shell. The attacker would be able to execute code as the user that ran the Spark application. Users are encouraged to update to version 2.1.2, 2.2.0 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.11"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.10"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyspark"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-12612"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2017-147.yaml"
}, {
"type" : "WEB",
"url" : "https://mail-archives.apache.org/mod_mbox/spark-dev/201709.mbox/%3CCAEccTyy-1yYuhdNgkBUg0sr9NeaZSrBKkBePdTNZbxXZNTAR-g%40mail.gmail.com%3E"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:26:38Z",
"nvd_published_at" : null
}
}