Lightning-fast unified analytics engine

Reporting Security Issues

Apache Spark uses the standard process outlined by the Apache Security Team for reporting vulnerabilities.

To report a possible security vulnerability, please email security@apache.org. This is a non-public list that will reach the Apache Security team, as well as the Spark PMC.

Known Security Issues

CVE-2018-8024: Apache Spark XSS vulnerability in UI

Versions Affected:

  • Spark versions through 2.1.2
  • Spark 2.2.0 through 2.2.1
  • Spark 2.3.0

Description: In Apache Spark up to and including 2.1.2, 2.2.0 to 2.2.1, and 2.3.0, it’s possible for a malicious user to construct a URL pointing to a Spark cluster’s UI’s job and stage info pages, and if a user can be tricked into accessing the URL, can be used to cause script to execute and expose information from the user’s view of the Spark UI. While some browsers like recent versions of Chrome and Safari are able to block this type of attack, current versions of Firefox (and possibly others) do not.

Mitigation:

  • 1.x, 2.0.x, and 2.1.x users should upgrade to 2.1.3 or newer
  • 2.2.x users should upgrade to 2.2.2 or newer
  • 2.3.x users should upgrade to 2.3.1 or newer

Credit:

  • Spencer Gietzen, Rhino Security Labs

CVE-2018-1334: Apache Spark local privilege escalation vulnerability

Severity: High

Vendor: The Apache Software Foundation

Versions affected:

  • Spark versions through 2.1.2
  • Spark 2.2.0 to 2.2.1
  • Spark 2.3.0

Description: In Apache Spark up to and including 2.1.2, 2.2.0 to 2.2.1, and 2.3.0, when using PySpark or SparkR, it’s possible for a different local user to connect to the Spark application and impersonate the user running the Spark application.

Mitigation:

  • 1.x, 2.0.x, and 2.1.x users should upgrade to 2.1.3 or newer
  • 2.2.x users should upgrade to 2.2.2 or newer
  • 2.3.x users should upgrade to 2.3.1 or newer
  • Otherwise, affected users should avoid using PySpark and SparkR in multi-user environments.

Credit:

  • Nehm√© Tohm√©, Cloudera, Inc.

CVE-2017-12612 Unsafe deserialization in Apache Spark launcher API

JIRA: SPARK-20922

Severity: Medium

Vendor: The Apache Software Foundation

Versions Affected: Versions of Apache Spark from 1.6.0 until 2.1.1

Description: 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.

Mitigation: Update to Apache Spark 2.1.2, 2.2.0 or later.

Credit:

  • Aditya Sharad, Semmle

CVE-2017-7678 Apache Spark XSS web UI MHTML vulnerability

JIRA: SPARK-20393

Severity: Medium

Vendor: The Apache Software Foundation

Versions Affected: Versions of Apache Spark before 2.1.2, 2.2.0

Description: 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.

Mitigation: Update to Apache Spark 2.1.2, 2.2.0 or later.

Example: Request:

GET /app/?appId=Content-Type:%20multipart/related;%20boundary=_AppScan%0d%0a--
_AppScan%0d%0aContent-Location:foo%0d%0aContent-Transfer-
Encoding:base64%0d%0a%0d%0aPGh0bWw%2bPHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD48L2h0bWw%2b%0d%0a
HTTP/1.1

Excerpt from response:

<div class="row-fluid">No running application with ID Content-Type: multipart/related;
boundary=_AppScan
--_AppScan
Content-Location:foo
Content-Transfer-Encoding:base64
PGh0bWw+PHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD48L2h0bWw+
</div>

Result: In the above payload the BASE64 data decodes as:

<html><script>alert("XSS")</script></html>

Credit:

  • Mike Kasper, Nicholas Marion
  • IBM z Systems Center for Secure Engineering