CVE-2026-32773: Pyspark Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-9437-39hj-3c93
CVSS 6.1
CWE-80
Published
Advisory Summary

CVE-2026-32773 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Pyspark libraries in the PyPI ecosystem. The issue involves apache spark history server allows stored cross-site scripting through unescaped application names. Remediation is available by upgrading affected packages to version 3.5.8.

CVE-2026-32773 at a Glance

CVE Identifier CVE-2026-32773
GHSA Identifier GHSA-9437-39hj-3c93
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Pyspark
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-32773

To remediate this vulnerability, upgrade all affected Pyspark dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

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

pip show pyspark

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-32773, inspect your installed packages using pip:

pip show pyspark

Analyze the terminal output to locate any version of Pyspark in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.8), your application is affected.

Note: The pip show pyspark command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Pyspark, 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

There is a lack of XSS escaping in the Spark History Server prior to 3.5.8 which allows a malicious Spark job to generate arbitrary unescaped frontend code which could lead to a minimal privilege escalation in browser. Users are encouraged to upgrade to Spark 3.5.8 or later. This CVE is marked as "low" since the path to exploit requires both relatively high permissions (ability to launch a Spark job) and requires tricking a user with higher permissions to log in and visit the Spark history web page. Users are encouraged to upgrade their Spark history servers to Spark 3.5.8 or later.

CVE-2026-32773 Affected Pyspark Versions

3 component(s)
Fixed Versions:
3.5.8
Product / Package Ecosystem Affected Versions Fixed Version
pyspark
PyPI
≥ 3.0.0
< 3.5.8
3.5.8
org.apache.spark:spark-core_2.12
Maven
≥ 3.0.0
< 3.5.8
3.5.8
org.apache.spark:spark-core_2.13
Maven
≥ 3.0.0
< 3.5.8
3.5.8

References

Frequently Asked Questions

What is CVE-2026-32773?
CVE-2026-32773 is a security vulnerability in Pyspark involving Apache Spark History Server allows stored cross-site scripting through unescaped application names under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Pyspark versions are affected?
Affected versions include releases prior to 3.5.8 across affected packages: pyspark, org.apache.spark:spark-core_2.12, org.apache.spark:spark-core_2.13.
What version fixes CVE-2026-32773?
Upgrading to 3.5.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyspark affected?
Yes, pyspark is affected in releases prior to 3.5.8. Upgrade your dependency to 3.5.8 or later.
Is spark-core_2.12 affected?
Yes, org.apache.spark:spark-core_2.12 is affected in releases prior to 3.5.8. Upgrade your dependency to 3.5.8 or later.
What is the CVSS score of CVE-2026-32773?
CVE-2026-32773 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-32773?
CVE-2026-32773 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check PyPI dependencies for CVE-2026-32773?
Run the dependency tree command: 'pip show pyspark'. 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-9437-39hj-3c93",
  "modified" : "2026-10-05T22:53:36Z",
  "published" : "2026-09-02T12:31:29Z",
  "aliases" : [ "CVE-2026-32773" ],
  "summary" : "Apache Spark History Server allows stored cross-site scripting through unescaped application names",
  "details" : "There is a lack of XSS escaping in the Spark History Server prior to 3.5.8 which allows a malicious Spark job to generate arbitrary unescaped frontend code which could lead to a minimal privilege escalation in browser. Users are encouraged to upgrade to Spark 3.5.8 or later.\n\nThis CVE is marked as \"low\" since the path to exploit requires both relatively high permissions (ability to launch a Spark job) and requires tricking a user with higher permissions to log in and visit the Spark history web page.\n\nUsers are encouraged to upgrade their Spark history servers to Spark 3.5.8 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyspark"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.spark:spark-core_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.spark:spark-core_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32773"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/spark/pull/52851"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/spark/commit/3c83c2c6a22fe384280b99bb753b14800b7e27e1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/spark/commit/e739b7d349dbd41b78d49bc8086cab63db057e14"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/spark"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2026-3966.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SPARK-53747"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/k36prh3oxl1z6ov7w8rpmfnt07hmzw3v"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2026/09/01/4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-05T22:53:36Z",
    "nvd_published_at" : "2026-09-02T11:17:20Z"
  }
}