CVEfocus › CVE database › CVE-2022-33891

CVE-2022-33891Apache Spark shell command injection vulnerability via Spark UI

Known exploited (CISA KEV)CVSS 8.8 HighEPSS 82.0% (in the top 1% of all CVEs)Published 2022-07-18Updated 2025-10-21Assigner: apache

The Apache Spark UI offers the possibility to enable ACLs via the configuration option spark.acls.enable. With an authentication filter, this checks whether a user has access permissions to view or modify the application. If ACLs are enabled, a code path in HttpSecurityFilter can allow someone to perform impersonation by providing an arbitrary user name. A malicious user might then be able to reach a permission check function that will ultimately build a Unix shell command based on their input, and execute it. This will result in arbitrary shell command execution as the user Spark is currently running as. This affects Apache Spark versions 3.0.3 and earlier, versions 3.1.1 to 3.1.2, and versions 3.2.0 to 3.2.1.

CWE-78

What to do

This CVE is being exploited in the wild (CISA Known Exploited Vulnerabilities, added 2023-03-07). If you run an affected version, patch or mitigate now.

Fixed builds are available from Maven, PyPI: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Maven libraryorg.apache.spark:spark-parent_2.12Fixed3.2.2GHSA-4x9r-j582-cgr8
PyPI librarypysparkFixed3.2.2PYSEC-2022-236

What the vendor says

As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Upgrade to supported Apache Spark maintenance release 3.1.3, 3.2.2, or 3.3.0 or later

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.