CVE-2022-31777
Java vulnerability analysis and mitigation

Overview

A stored cross-site scripting (XSS) vulnerability was discovered in Apache Spark, identified as CVE-2022-31777. The vulnerability affects Apache Spark versions 3.2.1 and earlier, as well as version 3.3.0. The issue was discovered by Florian Walter from Veracode and was publicly disclosed on November 1, 2022. This security flaw is tracked internally as SPARK-39505 (NVD, OpenWall).

Technical details

The vulnerability is classified as a stored cross-site scripting (XSS) issue with a CVSS v3.1 base score of 5.4 (Medium severity). The attack vector is characterized by CVSS metrics AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N, indicating network accessibility, low attack complexity, required low privileges, and user interaction. The vulnerability is associated with CWE-74, which relates to improper neutralization of special elements in output used by a downstream component (NVD).

Impact

When exploited, this vulnerability allows remote attackers to execute arbitrary JavaScript code in the web browser of a user. The attack is performed by including malicious payloads into logs which are subsequently rendered in the Apache Spark UI. This can lead to compromised user sessions and potential data exposure (NVD).

Mitigation and workarounds

Users are advised to upgrade to Apache Spark maintenance releases 3.2.2, or 3.3.1 or later to address this vulnerability. This is the primary mitigation strategy recommended by the Apache Spark team (OpenWall).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66516CRITICAL10
  • JavaJava
  • tika
NoYesDec 04, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • org.lz4:lz4-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
CVE-2025-11222MEDIUM6.1
  • JavaJava
  • com.linecorp.centraldogma:centraldogma-server-auth-shiro
NoYesDec 04, 2025
CVE-2025-66453MEDIUM5.5
  • JavaJava
  • org.mozilla:rhino
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management