CVEs / CVE-2022-33891
CVE-2022-33891: Apache Spark Command Injection Vulnerability
- Known exploited in the CISA KEV catalog since 7 Mar 2023
- high 8.8 CVSS 3.1 (NVD)
- EPSS 93.2% chance of exploitation in the next 30 days, higher than 99% of CVEs (30 Oct 2026)
- Last changed at its sources
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.
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 and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache Spark | from 3.0.3 and earlier, up to and including 3.0.3 | — |
| Apache Software Foundation Apache Spark | from 3.1.1 to 3.1.2, up to and including 3.1.2 | — |
| Apache Software Foundation Apache Spark | from 3.2.0 to 3.2.1, up to and including 3.2.1 | — |
| Product | Affected | Fixed 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.2 | 3.2.2 |
| pyspark (PyPI) | before 3.1.3 | 3.1.3 |
| pyspark (PyPI) | from 3.2.0, before 3.2.2 | 3.2.2 |
Package versions from GHSA-4x9r-j582-cgr8.
Exploitation
| In CISA KEV since | 7 Mar 2023 |
|---|---|
| Due date for US federal agencies | 28 Mar 2023 |
| Used in ransomware campaigns | Unknown |
| Required action | Apply updates per vendor instructions. |
Severity
| CVSS 3.1 | 8.8 highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HScored by NVD |
|---|---|
| Weakness | CWE-78 |
References
- CVE-2022-33891 on NVD
- CVE-2022-33891 in the CISA KEV catalog
- https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc (cited by CISA)
- CVE-2022-33891 on OSV
- http://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html Exploit, Third Party Advisory, VDB Entry
- http://www.openwall.com/lists/oss-security/2023/05/02/1 Mailing List, Third Party Advisory
- https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc Mailing List, Third Party Advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-33891 Third Party Advisory, US Government Resource
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.