CVE-2017-12612: Spark core 2.11 Apache Spark Deserialization Of Untrusted Vulnerability

HIGH
Advisory Identifier: GHSA-8rhc-48pp-52gr
CVSS 7.8
CWE-502
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2017-12612
GHSA Identifier GHSA-8rhc-48pp-52gr
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Spark core 2.11
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

org.apache.spark:spark-core_2.11 fixed: 2.1.2
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.11</artifactId>
    <version>2.1.2</version>
</dependency>
org.apache.spark:spark-core_2.10 fixed: 2.1.2
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
    <version>2.1.2</version>
</dependency>
pyspark fixed: 2.1.2
pip install pyspark>=2.1.2
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.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

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.

CVE-2017-12612 Affected Spark core 2.11 Versions

3 component(s)
Fixed Versions:
2.1.2
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?
CVE-2017-12612 is a security vulnerability in Spark core 2.11 involving Apache Spark Deserialization of Untrusted Data vulnerability under CWE-502: Deserialization of Untrusted Data.
Which Spark core 2.11 versions are affected?
Affected versions include releases prior to 2.1.2 across affected packages: org.apache.spark:spark-core_2.11, org.apache.spark:spark-core_2.10, pyspark.
What version fixes CVE-2017-12612?
Upgrading to 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spark-core_2.11 affected?
Yes, org.apache.spark:spark-core_2.11 is affected in releases prior to 2.1.2. Upgrade your dependency to 2.1.2 or later.
Is spark-core_2.10 affected?
Yes, org.apache.spark:spark-core_2.10 is affected in releases prior to 2.1.2. Upgrade your dependency to 2.1.2 or later.
What is the CVSS score of CVE-2017-12612?
CVE-2017-12612 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-12612?
CVE-2017-12612 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2017-12612?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.spark'. 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-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
  }
}