cve.bz

CVE-2022-33891 Apache Spark Command Injection Vulnerability

8.8 highKEVExploitEPSS 93%Fix available

High (8.8) in Apache Spark. In CISA KEV since 2023-03-07. EPSS 93% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.spark:spark-parent_2.12 3.2.2.

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

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
93% (unchanged from 93% a week ago; 93% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2023-03-07, due 2023-03-28
CISA's assessment (SSVC)
Exploitation: active · Automatable: no · Technical impact: total, assessed 2025-02-04. 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-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-33891 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-33891?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-33891?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-33891 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 Sparkfrom 3.0.3 and earlier through 3.0.3
Apache Software Foundation Apache Sparkfrom 3.1.1 to 3.1.2 through 3.1.2
Apache Software Foundation Apache Sparkfrom 3.2.0 to 3.2.1 through 3.2.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4x9r-j582-cgr8Mavenorg.apache.spark:spark-parent_2.12<=3.0.3no fix published
GHSA-4x9r-j582-cgr8Mavenorg.apache.spark:spark-parent_2.12>=3.1.1 <3.2.23.2.2
GHSA-4x9r-j582-cgr8PyPIpyspark<3.1.33.1.3
GHSA-4x9r-j582-cgr8PyPIpyspark>=3.2.0 <3.2.23.2.2
PYSEC-2022-236PyPIpyspark<3.1.3
>=3.2.0 <3.2.2
3.1.3, 3.2.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSEOpenStack Cloud 9venv-openstack-barbican7.0.1~dev24-3.37.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9venv-openstack-horizon14.1.1~dev11-4.43.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9venv-openstack-neutron13.0.8~dev209-6.43.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9venv-openstack-nova18.3.1~dev92-3.43.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9openstack-barbican7.0.1~dev24-3.17.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9openstack-heat-gbp14.0.1~dev5-3.12.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9openstack-horizon-plugin-gbp-ui14.0.1~dev6-3.15.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9openstack-neutron13.0.8~dev209-3.43.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9openstack-neutron-gbp14.0.1~dev52-3.37.1SUSE-SU-2023:0070-1
SUSEOpenStack Cloud 9, OpenStack Cloud Crowbar 9spark2.2.3-5.12.1SUSE-SU-2023:0070-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Middleware as Data Grid 7 and Fuse 7 products listed in this CVE page does not ship Apache Spark with their source code or binaries. Those who ship Apache Spark partially do are running versions < 3.x. Since 3.x is written in Scala and 2.x is written in Java, there's a difference in their source code.

In 2.4 version this demands 'spark.acls.enable' which comes disabled by default, needs to be set 'true' in order to be vulnerable. Red Hat Middleware stack does not have this option enabled.

ProductPackageStateAdvisory
Red Hat build of Apache Camel for Spring Boot 3apache-sparkNot affected
Red Hat Fuse 7apache-sparkNot affected
Red Hat Integration Camel K 1apache-sparkNot affected
Red Hat JBoss Data Grid 7apache-sparkNot affected

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-33891.

Public exploits

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON