# CVE-2022-31777: Apache Spark XSS vulnerability in log viewer UI Javascript

- Priority: **Routine**
- Reason: Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-11-01 · Modified: 2025-05-06
- Aliases: GHSA-43xg-8wmj-cw8h, BIT-spark-2022-31777, PYSEC-2022-42976
- Record: https://cvemate.com/vulnerability/CVE-2022-31777 · JSON: https://cvemate.com/vulnerability/CVE-2022-31777/json

## Description

```text
A stored cross-site scripting (XSS) vulnerability in Apache Spark 3.2.1 and earlier, and 3.3.0, allows remote attackers to execute arbitrary JavaScript in the web browser of a user, by including a malicious payload into the logs which would be returned in logs rendered in the UI.
```

## Signals

- CVSS: 5.4 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- EPSS: 1.833%, percentile 79.632%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache spark: 3.3.0 \| ≥ 3.2.1 and earlier, ≤ 3.2.1
- apache spark: \< 3.2.2 \| 3.3.0
- org.apache.spark spark-core\_2.10 (Maven): All versions (No fix recorded)
- org.apache.spark spark-core\_2.11 (Maven): All versions (No fix recorded)
- org.apache.spark spark-core\_2.12 (Maven): \< 3.2.2 \| ≥ 3.3.0, \< 3.3.1
- org.apache.spark spark-core\_2.13 (Maven): \< 3.2.2 \| ≥ 3.3.0, \< 3.3.1
- org.apache.spark spark-core\_2.9.3 (Maven): All versions (No fix recorded)
- PyPI pyspark (PyPI): \< 3.2.2 \| ≥ 3.3.0, \< 3.3.1

## References

- <https://lists.apache.org/thread/60mgbswq2lsmrxykfxpqq13ztkm2ht6q>
- <http://www.openwall.com/lists/oss-security/2022/11/01/14>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31777>
- <https://github.com/apache/spark/commit/ad90195de56688ce0898691eb9d04297ab0871ad>
- <https://github.com/apache/spark>
- <https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-42976.yaml>
- <https://web.archive.org/web/20220728105026/https://issues.apache.org/jira/browse/SPARK-39505>
- <https://github.com/advisories/GHSA-43xg-8wmj-cw8h>

---

Data as of 2026-12-05T04:11:55.537Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
