// For flags

CVE-2022-33891

Apache Spark Command Injection Vulnerability

Severity Score

8.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

8
*Multiple Sources

Exploited in Wild

Yes
*KEV

Decision

-
*SSVC
Descriptions

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.

La interfaz de usuario de Apache Spark ofrece la posibilidad de habilitar ACLs por medio de la opción de configuración spark.acls.enable. Con un filtro de autenticación, es comprobado si un usuario presenta permisos de acceso para ver o modificar la aplicación. Si las ACLs están habilitadas, una ruta de código en HttpSecurityFilter puede permitir que alguien lleve a cabo una suplantación de identidad proporcionando un nombre de usuario arbitrario. Un usuario malicioso podría entonces ser capaz de llegar a una función de comprobación de permisos que finalmente construirá un comando de shell Unix basado en su entrada, y lo ejecutará. Esto resultará en la ejecución de un comando shell arbitrario como el usuario con el que Spark se está ejecutando actualmente. Esto afecta a las versiones de Apache Spark 3.0.3 y anteriores, a las versiones 3.1.1 a 3.1.2 y a las versiones 3.2.0 a 3.2.1

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

*Credits: Kostya Kortchinsky (Databricks)
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-06-17 CVE Reserved
  • 2022-07-18 CVE Published
  • 2022-07-18 First Exploit
  • 2023-03-07 Exploited in Wild
  • 2023-03-28 KEV Due Date
  • 2024-08-03 CVE Updated
  • 2024-09-10 EPSS Updated
CWE
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Apache
Search vendor "Apache"
Spark
Search vendor "Apache" for product "Spark"
<= 3.0.3
Search vendor "Apache" for product "Spark" and version " <= 3.0.3"
-
Affected
Apache
Search vendor "Apache"
Spark
Search vendor "Apache" for product "Spark"
>= 3.1.1 <= 3.1.2
Search vendor "Apache" for product "Spark" and version " >= 3.1.1 <= 3.1.2"
-
Affected
Apache
Search vendor "Apache"
Spark
Search vendor "Apache" for product "Spark"
>= 3.2.0 <= 3.2.1
Search vendor "Apache" for product "Spark" and version " >= 3.2.0 <= 3.2.1"
-
Affected