This module exploits an unauthenticated command injection vulnerability in Apache Spark. Successful exploitation results in remote code execution under the context of the Spark application user. The command injection occurs because Spark checks the group membership of the user passed in the ?doAs parameter by using a raw Linux command. It is triggered by a non-default setting called spark.acls.enable. This configuration setting spark.acls.enable should be set true in the Spark configuration to make the application vulnerable for this attack. 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 are affected by this vulnerability.
Vulnerability
CVE-2022-33891
Apache Spark shell command injection vulnerability via Spark UI
Vulnerability details
- Score
- 8.8
- Severity
- high
CVSS 3.1 · CISA-ADP
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDescription
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.
CVE ProgramExploit source choices
12 sources【懒人神器】一款图形化、批量采集url、批量对采集的url进行各种nday检测的工具。可用于src挖掘、cnvd挖掘、0day利用、打造自己的武器库等场景。可以批量利用Actively Exploited Atlassian Confluence 0Day CVE-2022-26134和DedeCMS v5.7.87 SQL注入 CVE-2022-23337。
essential templates for kenzer [DEPRECATED]
Apache Spark Shell Command Injection Vulnerability
cve-2022-33891-poc
「💥」CVE-2022-33891 - Apache Spark Command Injection
akbartrilaksana/cve-2022-33891 source repository
A PoC exploit for CVE-2022-33891 - Apache Spark UI Remote Code Execution (RCE)
devengpk/apache-zero-days source repository
CVE-2022-33891 Exploit For Apache Spark
asepsaepdin/cve-2022-33891 source repository
Generated personal blog