CVE-2017-7678: Spark core 2.11 Spark-core_2.10 And Org.apache.spark:spark-core_2.11 Vulnerability
MODERATECVE-2017-7678 is a MODERATE (CVSS 6.1) spark-core_2.10 and org.apache.spark:spark-core_2.11 vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Spark core 2.11 libraries in the Maven ecosystem. The issue involves spark-core_2.10 and org.apache.spark:spark-core_2.11. Remediation is available by upgrading affected packages to version 2.2.0.
CVE-2017-7678 at a Glance
Security Impact
CVSS: 6.1
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:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2017-7678
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.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>2.2.0</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.apache.spark
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2017-7678, 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.2.0), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-7678 Affected Spark core 2.11 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.spark:spark-core_2.11
|
Maven |
< 2.2.0
|
2.2.0
|
|
org.apache.spark:spark-core_2.10
|
Maven |
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is CVE-2017-7678?
Which Spark core 2.11 versions are affected?
What version fixes CVE-2017-7678?
Is spark-core_2.11 affected?
Is spark-core_2.10 affected?
What is the CVSS score of CVE-2017-7678?
What CWE is associated with CVE-2017-7678?
How can I check Maven dependencies for CVE-2017-7678?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r34r-f84j-5x4x",
"modified" : "2021-09-17T14:13:37Z",
"published" : "2018-11-09T17:43:08Z",
"aliases" : [ "CVE-2017-7678" ],
"summary" : "Moderate severity vulnerability that affects org.apache.spark:spark-core_2.10 and org.apache.spark:spark-core_2.11",
"details" : "In Apache Spark before 2.2.0, it is possible for an attacker to take advantage of a user's trust in the server to trick them into visiting a link that points to a shared Spark cluster and submits data including MHTML to the Spark master, or history server. This data, which could contain a script, would then be reflected back to the user and could be evaluated and executed by MS Windows-based clients. It is not an attack on Spark itself, but on the user, who may then execute the script inadvertently when viewing elements of the Spark web UIs.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.11"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.10"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-7678"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-r34r-f84j-5x4x"
}, {
"type" : "WEB",
"url" : "http://apache-spark-developers-list.1001551.n3.nabble.com/CVE-2017-7678-Apache-Spark-XSS-web-UI-MHTML-vulnerability-td21947.html"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/99603"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:53:27Z",
"nvd_published_at" : null
}
}