CVE-2022-33891Apache Spark shell command injection vulnerability via Spark UI
- 8.8HighCVSS base score
- 92.9%Exploitation in 30 daysEPSS · top 0.2% of all CVEs
- YesKnown exploitedin CISA's KEV since 7 Mar 2023
- 2Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as Apache Spark Command Injection Vulnerability.
- Added
- 7 Mar 2023
- Fix due (US federal)
- 28 Mar 2023
- Used by ransomware
- Not known
Apply updates per vendor instructions.
ENISA's EU Vulnerability Database lists it as exploited, from CISA's KEV, since 7 Mar 2023.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Metasploit module and a Nuclei template for it. CISA's SSVC rates its exploitation: it is being exploited.
Show the exploits2
Metasploit modules1 module
- Apache Spark Unauthenticated Command Injection RCE (Metasploit module) (opens in a new tab)
exploit/linux/http/apache_spark_rce_cve_2022_33891Rank excellentdisclosed 18 Jul 2022
Nuclei templates1 template
- Apache Spark UI - Remote Command Injection (Nuclei template) (opens in a new tab)
http/cves/2022/CVE-2022-33891.yamlSeverity high
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By apache
- 31 days later
· 31 days later
Published
- 8 months later
· 8 months later
Added to CISA KEV
Known exploited in the wild
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 92.9% · top 0.2% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
Apache Software Foundation · Apache Spark
- affected 3.0.3 and earlier – ≤ 3.0.3
- affected 3.1.1 to 3.1.2 – ≤ 3.1.2
- affected 3.2.0 to 3.2.1 – ≤ 3.2.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.apache.spark:spark-parent_2.12GHSA-4x9r-j582-cgr8 (opens in a new tab)
- PyPIpysparkGHSA-4x9r-j582-cgr8 (opens in a new tab)
What to do
Workaround: Upgrade to supported Apache Spark maintenance release 3.1.3, 3.2.2, or 3.3.0 or later
References
References4
- https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc (opens in a new tab)x_transferred
- http://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html (opens in a new tab)x_transferred
- [oss-security] 20230502 CVE-2023-32007: Apache Spark: Shell command injection via Spark UI (opens in a new tab)mailing-listx_transferred
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-33891 (opens in a new tab)government-resource
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-0217 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-4x9r-j582-cgr8 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-33891)Record last updated .