CVE-2018-17190: Spark core 2.11 Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-phg2-9c5g-m4q7
CVSS 9.8
Published
Advisory Summary

CVE-2018-17190 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (General Security Weakness) affecting Spark core 2.11 libraries in the Maven ecosystem. The issue involves remote code execution in spark-core. Remediation is available in the latest vendor maintenance releases.

CVE-2018-17190 at a Glance

CVE Identifier CVE-2018-17190
GHSA Identifier GHSA-phg2-9c5g-m4q7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification General Security Weakness
Affected Product Spark core 2.11
Package Ecosystem Maven
Published Date
Last Updated

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

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

How to Fix CVE-2018-17190

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: Latest secure release
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.11</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.spark:spark-core_2.10 fixed: Latest secure release
<dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-core_2.10</artifactId>
    <version>Latest secure release</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.apache.spark

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2018-17190, 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 the patched release), 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 General Security Weakness. 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 all versions of Apache Spark, its standalone resource manager accepts code to execute on a 'master' host, that then runs that code on 'worker' hosts. The master itself does not, by design, execute user code. A specially-crafted request to the master can, however, cause the master to execute code too. Note that this does not affect standalone clusters with authentication enabled. While the master host typically has less outbound access to other resources than a worker, the execution of code on the master is nevertheless unexpected. # Mitigation Enable authentication on any Spark standalone cluster that is not otherwise secured from unwanted access, for example by network-level restrictions. Use spark.authenticate and related security properties described at https://spark.apache.org/docs/latest/security.html

CVE-2018-17190 Affected Spark core 2.11 Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.spark:spark-core_2.11
Maven
org.apache.spark:spark-core_2.10
Maven

References

Frequently Asked Questions

What is CVE-2018-17190?
CVE-2018-17190 is a security vulnerability in Spark core 2.11 involving Remote Code Execution in spark-core under General Security Weakness.
Which Spark core 2.11 versions are affected?
Affected versions include releases prior to current release patches across affected packages: org.apache.spark:spark-core_2.11, org.apache.spark:spark-core_2.10.
What version fixes CVE-2018-17190?
Upgrading to current release patches (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 Latest secure release. Upgrade your dependency to Latest secure release or later.
Is spark-core_2.10 affected?
Yes, org.apache.spark:spark-core_2.10 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2018-17190?
CVE-2018-17190 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-17190?
CVE-2018-17190 is classified under General Security Weakness.
How can I check Maven dependencies for CVE-2018-17190?
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-phg2-9c5g-m4q7",
  "modified" : "2022-09-14T22:04:46Z",
  "published" : "2018-11-21T22:19:30Z",
  "aliases" : [ "CVE-2018-17190" ],
  "summary" : "Remote Code Execution in spark-core",
  "details" : "In all versions of Apache Spark, its standalone resource manager accepts code to execute on a 'master' host, that then runs that code on 'worker' hosts. The master itself does not, by design, execute user code. A specially-crafted request to the master can, however, cause the master to execute code too. Note that this does not affect standalone clusters with authentication enabled. While the master host typically has less outbound access to other resources than a worker, the execution of code on the master is nevertheless unexpected.\n\n# Mitigation\nEnable authentication on any Spark standalone cluster that is not otherwise secured from unwanted access, for example by network-level restrictions. Use spark.authenticate and related security properties described at https://spark.apache.org/docs/latest/security.html",
  "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.apache.spark:spark-core_2.11"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.spark:spark-core_2.10"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17190"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-phg2-9c5g-m4q7"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/341c3187f15cdb0d353261d2bfecf2324d56cb7db1339bfc7b30f6e5@%3Cdev.spark.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201903-21"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/105976"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:49:15Z",
    "nvd_published_at" : null
  }
}