Skip to content
OpenAdvisories
High · 8.8 Known exploited Scanner template Public exploit CVE-2022-33891 BIT-spark-2022-33891EUVD-2022-0217GHSA-4x9r-j582-cgr8PYSEC-2022-236

Apache Spark shell command injection vulnerability via Spark UI

Published Jul 18, 2022 · Updated Oct 21, 2025 · Assigned by apache

Description

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.

Affected products

VendorProductAffectedFixed
Apache Software Foundation Apache Spark 3.0.3 and earlier – ≤ 3.0.3, 3.1.1 to 3.1.2 – ≤ 3.1.2, 3.2.0 to 3.2.1 – ≤ 3.2.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SUSE OpenStack Cloud Crowbar 9 openstack-barbican 7.0.1~dev24-3.17.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud Crowbar 9 openstack-heat-gbp 14.0.1~dev5-3.12.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud Crowbar 9 openstack-horizon-plugin-gbp-ui 14.0.1~dev6-3.15.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud Crowbar 9 openstack-neutron 13.0.8~dev209-3.43.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud Crowbar 9 openstack-neutron-gbp 14.0.1~dev52-3.37.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud Crowbar 9 spark 2.2.3-5.12.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 openstack-barbican 7.0.1~dev24-3.17.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 openstack-heat-gbp 14.0.1~dev5-3.12.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 openstack-horizon-plugin-gbp-ui 14.0.1~dev6-3.15.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 openstack-neutron 13.0.8~dev209-3.43.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 openstack-neutron-gbp 14.0.1~dev52-3.37.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 spark 2.2.3-5.12.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 venv-openstack-barbican 7.0.1~dev24-3.37.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 venv-openstack-horizon 14.1.1~dev11-4.43.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 venv-openstack-neutron 13.0.8~dev209-6.43.1 SUSE-SU-2023:0070-1
SUSE OpenStack Cloud 9 venv-openstack-nova 18.3.1~dev92-3.43.1 SUSE-SU-2023:0070-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

GitHub 10 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.apache.spark:spark-parent_2.12 <= 3.0.3 — GHSA-4x9r-j582-cgr8
Maven org.apache.spark:spark-parent_2.12 >= 3.1.1, < 3.2.2 3.2.2 GHSA-4x9r-j582-cgr8
PyPI pyspark < 3.1.3 · >= 3.2.0, < 3.2.2 3.1.3, 3.2.2 PYSEC-2022-236
PyPI pyspark < 3.1.3 3.1.3 GHSA-4x9r-j582-cgr8
PyPI pyspark >= 3.2.0, < 3.2.2 3.2.2 GHSA-4x9r-j582-cgr8

Advisories 1

References