Stackurity Start free trial

CVEs / CVE-2022-33891

CVE-2022-33891: Apache Spark Command Injection Vulnerability

Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.

Check your servers with Stackurity Already using Stackurity? Search for CVE-2022-33891

Summary

Apache Spark contains a command injection vulnerability via Spark User Interface (UI) when Access Control Lists (ACLs) are enabled.

CISA, Known Exploited Vulnerabilities catalog

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.

The CVE record, via NVD · published 18 Jul 2022 · NVD status: Analyzed

Affected and fixed versions

As stated by the CVE record (from the CNA)
ProductAffectedFixed in
Apache Software Foundation Apache Sparkfrom 3.0.3 and earlier, up to and including 3.0.3—
Apache Software Foundation Apache Sparkfrom 3.1.1 to 3.1.2, up to and including 3.1.2—
Apache Software Foundation Apache Sparkfrom 3.2.0 to 3.2.1, up to and including 3.2.1—
As stated by OSV
ProductAffectedFixed in
org.apache.spark:spark-parent_2.12 (Maven)up to and including 3.0.3—
org.apache.spark:spark-parent_2.12 (Maven)from 3.1.1, before 3.2.23.2.2
pyspark (PyPI)before 3.1.33.1.3
pyspark (PyPI)from 3.2.0, before 3.2.23.2.2

Package versions from GHSA-4x9r-j582-cgr8.

Exploitation

In CISA KEV since7 Mar 2023
Due date for US federal agencies28 Mar 2023
Used in ransomware campaignsUnknown
Required actionApply updates per vendor instructions.

Severity

CVSS 3.18.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scored by NVD
WeaknessCWE-78

References

Sources

Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.

This product uses data from the NVD API but is not endorsed or certified by the NVD.