Skip to content

← Actionable
Medium, CVSS 5.4amended

Apache Spark vulnerable to Log Injection

CVE-2022-31777GHSA-43xg-8wmj-cw8h

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Maven org.apache.spark:spark-core_2.12

    Affected
    < 3.2.2>= 3.3.0, < 3.3.1
    Fixed in
    3.2.2, 3.3.1
  • Maven org.apache.spark:spark-core_2.13

    Affected
    < 3.2.2>= 3.3.0, < 3.3.1
    Fixed in
    3.2.2, 3.3.1
  • Maven org.apache.spark:spark-core_2.11

    Affected
    every version
    Fixed in
    no fixed version recorded
  • Maven org.apache.spark:spark-core_2.9.3

    Affected
    every version
    Fixed in
    no fixed version recorded
  • PyPI pyspark

    Affected
    < 3.2.2>= 3.3.0, <= 3.3.0
    Fixed in
    3.3.1, 3.2.2
  • Maven org.apache.spark:spark-core_2.10

    Affected
    every version
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.4 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS
  • CVE-2022-31777: 1.82% estimated exploitation activity in the next 30 days; percentile 78.77 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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.

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-43xg-8wmj-cw8h

  2. Revision 1 · created ·

    Published from osv record GHSA-43xg-8wmj-cw8h

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2022-31777

Advisory: Apache Spark vulnerable to Log Injection
IDs: CVE-2022-31777, GHSA-43xg-8wmj-cw8h
Record: https://patchnext.com/advisories/cve-2022-31777 (revision 2, source checked 26 Oct 2026, 13:36 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.4)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: org.apache.spark:spark-core_2.12 3.3.1, 3.2.2; org.apache.spark:spark-core_2.13 3.3.1, 3.2.2; pyspark 3.3.1, 3.2.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- Maven org.apache.spark:spark-core_2.12: affected < 3.2.2; >= 3.3.0, < 3.3.1; fixed in 3.2.2, 3.3.1
- Maven org.apache.spark:spark-core_2.13: affected < 3.2.2; >= 3.3.0, < 3.3.1; fixed in 3.2.2, 3.3.1
- Maven org.apache.spark:spark-core_2.11: affected every version
- Maven org.apache.spark:spark-core_2.9.3: affected every version
- PyPI pyspark: affected < 3.2.2; >= 3.3.0, <= 3.3.0; fixed in 3.3.1, 3.2.2
- Maven org.apache.spark:spark-core_2.10: affected every version

## Suggested inspection (read-only)
- Maven org.apache.spark:spark-core_2.12: check the installed version with your package manager.
- Maven org.apache.spark:spark-core_2.13: check the installed version with your package manager.
- Maven org.apache.spark:spark-core_2.11: check the installed version with your package manager.
- Maven org.apache.spark:spark-core_2.9.3: check the installed version with your package manager.
- `python -m pip show pyspark`: prints the installed version. Run with the environment that serves production active.
- Maven org.apache.spark:spark-core_2.10: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on org.apache.spark:spark-core_2.12, org.apache.spark:spark-core_2.13, org.apache.spark:spark-core_2.11, org.apache.spark:spark-core_2.9.3, pyspark, org.apache.spark:spark-core_2.10.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-43xg-8wmj-cw8h (OSV record GHSA-43xg-8wmj-cw8h lists affected ranges: PyPI pyspark >=0 =3.3.0 =0; Maven org.apache.spark:spark-core_2.13 >=0 =3.3.0 =0 =3.3.0 =0; Maven org.apache.spark:spark-core_2.10 >=0)
- Verified: https://github.com/advisories/GHSA-43xg-8wmj-cw8h (GitHub-reviewed advisory GHSA-43xg-8wmj-cw8h lists affected ranges: PyPI pyspark >=0 =3.3.0 <=3.3.0)

Commands are suggestions: review each one before running it.

Loading voting…