CVE-2022-33891

HIGH KEV NUCLEI LAB

Apache Spark UI - Privilege Escalation

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2022-33891 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added March 7, 2023. EIP tracks 14 public exploits from researchers including HuskyHacks, W01fh4cker, AmoloHT, including a Metasploit module exploits/linux/http/apache_spark_rce_cve_2022_33891. A Nuclei detection template is also available.

AI-analyzed exploit summary This repository contains a functional Python PoC for CVE-2022-33891, a command injection vulnerability in Apache Spark. The exploit leverages the `doAs` parameter to execute arbitrary commands via bash interpolation, with support for reverse shells and vulnerability checks.

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.

Exploits (14)

nomisec WORKING POC 88 stars
by HuskyHacks · remote
https://github.com/HuskyHacks/cve-2022-33891

This repository contains a functional Python PoC for CVE-2022-33891, a command injection vulnerability in Apache Spark. The exploit leverages the `doAs` parameter to execute arbitrary commands via bash interpolation, with support for reverse shells and vulnerability checks.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark versions 3.0.3 and earlier, 3.1.1 to 3.1.2, and 3.2.0 to 3.2.1
No auth needed
Prerequisites: Vulnerable Apache Spark instance with `spark.acls.enable` set to true · Network access to the Spark UI (default port 8080)
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 52 stars
by W01fh4cker · remote
https://github.com/W01fh4cker/cve-2022-33891

This repository contains a functional exploit PoC for CVE-2022-33891, which targets Apache Spark. The exploit leverages command injection via the `doAs` parameter to trigger a DNS lookup, confirming vulnerability through dnslog.cn.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark (unspecified version)
No auth needed
Prerequisites: Network access to the target Apache Spark instance · DNS resolution visibility (via dnslog.cn or similar)
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 25 stars
by AmoloHT · remote
https://github.com/AmoloHT/CVE-2022-33891

The repository contains a functional exploit for CVE-2022-33891, which leverages command injection via the `doAs` parameter in Apache Spark UI when ACLs are enabled. The script sends a crafted HTTP request with a sleep command to test for vulnerability.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark (versions 3.0.3 and earlier, 3.1.1 to 3.1.2, 3.2.0 to 3.2.1)
No auth needed
Prerequisites: Apache Spark UI with ACLs enabled · Network access to the target Spark UI
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 3 stars
by AkbarTrilaksana · remote
https://github.com/AkbarTrilaksana/cve-2022-33891

This repository contains a functional Python PoC for CVE-2022-33891, a command injection vulnerability in Apache Spark. The exploit leverages the `doAs` parameter to execute arbitrary commands via base64-encoded payloads, including a reverse shell option.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark (versions 3.0.3 and earlier, 3.1.1 to 3.1.2, 3.2.0 to 3.2.1)
No auth needed
Prerequisites: Vulnerable Apache Spark instance with `spark.acls.enable` set to `true`
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 1 stars
by K3ysTr0K3R · remote
https://github.com/K3ysTr0K3R/CVE-2022-33891-EXPLOIT

This repository contains a functional exploit for CVE-2022-33891, an RCE vulnerability in Apache Spark UI due to improper handling of ACLs. The exploit uses command injection via the 'doAs' parameter to achieve remote code execution, with options for both reverse and bind shells.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Spark UI (with ACLs enabled)
No auth needed
Prerequisites: Apache Spark UI with ACLs enabled (spark.acls.enable=true) · Network access to the target Spark UI
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec SUSPICIOUS 1 stars
by Vulnmachines · poc
https://github.com/Vulnmachines/Apache-spark-CVE-2022-33891

The repository contains no exploit code, only a YouTube video link and social media links. It lacks technical details about the vulnerability or PoC code.

Classification
Suspicious 90%
Attack Type
Rce
Complexity
Theoretical
Reliability
Theoretical
Target: Apache Spark
No auth needed
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC 1 stars
by DrLinuxOfficial · remote
https://github.com/DrLinuxOfficial/CVE-2022-33891

This repository contains a functional exploit for CVE-2022-33891, an Apache Spark vulnerability allowing remote command execution via the 'doAs' parameter. The exploit checks for vulnerability by measuring response time delays and provides an interactive shell for command execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark versions 3.1.1, 3.1.2, 3.2.0, 3.2.1
No auth needed
Prerequisites: Network access to vulnerable Apache Spark instance · Python 3.7 or newer
devstral-2 · analyzed Feb 18, 2026 Full analysis →
gitlab WRITEUP
by vital6 · poc
https://gitlab.com/vital6/cve-2022-33891

This repository provides a detailed technical analysis and infrastructure setup for testing CVE-2022-33891, a command injection vulnerability in Apache Spark 3.1.1. It includes Docker configurations for both patched and unpatched Spark environments to demonstrate the vulnerability and its mitigation.

Classification
Writeup 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Spark 3.1.1
No auth needed
Prerequisites: Docker · Docker Compose · SSH access to the testing environment
devstral-2 · analyzed Feb 23, 2026 Full analysis →
nomisec WORKING POC
by asepsaepdin · remote
https://github.com/asepsaepdin/CVE-2022-33891

This repository contains a functional Python-based exploit for CVE-2022-33891, an Apache Spark command injection vulnerability. The PoC leverages improper input validation in the `doAs` parameter to execute arbitrary shell commands, including a reverse shell payload.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Spark (versions 3.0.3 and earlier, 3.1.1 to 3.1.2, 3.2.0 to 3.2.1)
No auth needed
Prerequisites: ACLs enabled in Spark configuration (spark.acls.enable=true) · Access to the Spark UI endpoint
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC
by ps-interactive · poc
https://github.com/ps-interactive/lab_security_apache_spark_emulation_detection

This repository contains a functional proof-of-concept for CVE-2022-33891, which exploits a vulnerability in Apache Spark's ACL configuration. It sets up a vulnerable Spark instance (version 3.1.1) with misconfigured ACLs and uses Apache as a reverse proxy to demonstrate the exploit.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Spark 3.1.1
No auth needed
Prerequisites: Docker and Docker Compose installed · Apache2 with mod_security2
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WRITEUP
by elsvital · poc
https://github.com/elsvital/cve-2022-33891-fix

This repository provides a detailed guide on patching CVE-2022-33891, a vulnerability in Apache Spark that allows arbitrary shell command execution via ACL authentication. It includes steps to reproduce the vulnerability using an external PoC and apply the official patch.

Classification
Writeup 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Spark 3.2.0
Auth required
Prerequisites: Ubuntu 22.04 · Git · Maven · Python 3 · Apache Spark 3.2.0
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC
by nanaao · poc
https://github.com/nanaao/CVE-2022-33891

This repository contains a functional exploit for CVE-2022-33891, an Apache Spark ACL bypass vulnerability leading to remote command execution (RCE). The PoC sends a crafted HTTP request with a `doAs` parameter to execute arbitrary commands via `wget` and `bash`.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark (when `spark.acls.enable` is set to `TRUE`)
No auth needed
Prerequisites: Apache Spark with `spark.acls.enable` enabled · Network access to the Spark UI (typically port 4040 or 8080)
devstral-2 · analyzed Feb 18, 2026 Full analysis →
vulncheck_xdb WORKING POC
remote
https://github.com/Shelter1234/VulneraLab

The repository contains functional exploit code for CVE-2022-33891, demonstrating a command injection vulnerability in Apache Spark. The exploit leverages the `doAs` parameter in the Spark UI to execute arbitrary shell commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: 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
No auth needed
Prerequisites: Access to the Spark UI · ACLs enabled in Spark configuration
devstral-2 · analyzed Feb 25, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by Kostya Kortchinsky · rubypocunix
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_spark_rce_cve_2022_33891.rb

This Metasploit module exploits CVE-2022-33891, an unauthenticated command injection vulnerability in Apache Spark. It leverages the `doAs` parameter to execute arbitrary commands via base64-encoded payloads, resulting in remote code execution.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Spark (versions 3.0.3 and earlier, 3.1.1 to 3.1.2, 3.2.0 to 3.2.1)
No auth needed
Prerequisites: spark.acls.enable set to true in Spark configuration
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

Apache Spark UI - Remote Command Injection
HIGHVERIFIEDby princechaddha
Shodan: title:"Spark Master at" || http.html:"/apps/imt/html/" || http.title:"spark master at"
FOFA: body="/apps/imt/html/" || title="spark master at"

References (4)

Core 4

Scores

CVSS v3 8.8
EPSS 0.9351
EPSS Percentile 99.8%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation active
Automatable no
Technical Impact total

Lab Environment

COMMUNITY
Community Lab
docker pull docker.io/bitnami/spark:3.1.1
docker pull shelter2024/apache-archiva-v2.2.7_web
docker pull shelter2024/spark-v3.1.1-web
docker pull shelter2024/apache-servicecomb-service-center-v2.1.0-web
docker pull shelter2024/boidcms-v2.0.0-web
+32 more images
+10 more repos

Details

CISA KEV 2023-03-07
VulnCheck KEV 2022-12-21
InTheWild.io 2022-07-21
ENISA EUVD EUVD-2022-0217
CWE
CWE-78
Status published
Products (5)
apache/spark < 3.0.3
org.apache.spark/spark-parent_2.12 0 - 3.0.3Maven
org.apache.spark/spark-parent_2.12 3.1.1 - 3.2.2Maven
pypi/pyspark 0 - 3.1.3PyPI
pypi/pyspark 3.2.0 - 3.2.2PyPI
Published Jul 18, 2022
KEV Added Mar 07, 2023
Tracked Since Feb 18, 2026