cve.bz

CVE-2022-31777 apache spark: Injection

5.4 mediumEPSS 1.8%Fix available

Medium (5.4) in apache spark. EPSS 1.8% estimated probability of exploitation activity in the next 30 days. Fixed in pyspark 3.2.2, 3.3.1.

On this page
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.

Severity

CVSS 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS
1.8% (unchanged from 1.8% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 79th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-05-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

  • pyspark (PyPI): fixed in 3.2.2, 3.3.1
  • org.apache.spark:spark-core_2.13 (Maven): fixed in 3.2.2, 3.3.1
  • org.apache.spark:spark-core_2.12 (Maven): fixed in 3.2.2, 3.3.1

Ask an AI about this CVE

Show the promptExplain CVE-2022-31777 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-31777?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-31777?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-31777 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache Spark3.3.0
Apache Software Foundation Apache Sparkfrom 3.2.1 and earlier through 3.2.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-43xg-8wmj-cw8hPyPIpyspark<3.2.23.2.2
GHSA-43xg-8wmj-cw8hPyPIpyspark>=3.3.0 <3.3.13.3.1
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.9.3all versionsno fix published
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.13<3.2.23.2.2
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.13>=3.3.0 <3.3.13.3.1
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.12<3.2.23.2.2
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.12>=3.3.0 <3.3.13.3.1
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.11all versionsno fix published
GHSA-43xg-8wmj-cw8hMavenorg.apache.spark:spark-core_2.10all versionsno fix published
PYSEC-2022-42976PyPIpyspark<3.2.23.2.2

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
RHINT Camel-Springboot 3.20.1apache-sparkFixed 2023-05-03RHSA-2023:2100
Red Hat Fuse 7apache-sparkWill not fix
Red Hat Integration Camel K 1apache-sparkWill not fix
Red Hat Integration Camel Quarkus 1apache-sparkWill not fix
Red Hat JBoss Data Grid 7apache-sparkOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-31777.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON