8.8highExploited
Apache Spark shell command injection vulnerability via Spark UI
- Severity
- 8.8high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 92.9% (higher than 99% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- apache
- Also known as
- GHSA-4x9r-j582-cgr8BIT-SPARK-2022-33891PYSEC-2022-236
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
| Product or package | Versions | Reported by |
|---|---|---|
| Apache Software Foundation Apache Spark | from 3.0.3 and earlier up to 3.0.3, from 3.1.1 to 3.1.2 up to 3.1.2, from 3.2.0 to 3.2.1 up to 3.2.1 | CVE List |
| org.apache.spark:spark-parent_2.12 (Maven) | up to 3.0.3, from 3.1.1 before 3.2.2 | GitHub Advisory Database |
| pyspark (PyPI) | before 3.1.3, from 3.2.0 before 3.2.2 | GitHub Advisory Database, PyPA Advisory Database |
| apache spark | up to 3.0.3, from 3.1.1 up to 3.1.2, from 3.2.0 up to 3.2.1 | NVD, CISA KEV |
| spark (Bitnami) | before 3.0.4, from 3.1.1 before 3.1.3, from 3.2.0 before 3.2.2 | Bitnami Vulnerability Database |
All scores
| CISA-ADP | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N/E:A |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation active, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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.
A previous version of this advisory incorrectly stated that version 3.1.3 was not vulnerable. Per GHSA-59hw-j9g6-mfg3, version 3.1.3 is vulnerable and vulnerable version ranges in this advisory have been changed to reflect the correct information.
NVD (es)
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
CISA KEV
Apache Spark contains a command injection vulnerability via Spark User Interface (UI) when Access Control Lists (ACLs) are enabled.
References
| https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc | advisory, kev, mailing-list, third-party-advisory, web | |
| http://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html | advisory, exploit, third-party-advisory, vdb-entry, web | |
| http://www.openwall.com/lists/oss-security/2023/05/02/1 | advisory, mailing-list, third-party-advisory, web | |
| https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-33891 | advisory, government-resource, third-party-advisory, us-government-resource, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-33891 | advisory, kev, web | |
| https://github.com/apache/spark | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-236.yaml | web | |
| https://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html | web | |
| https://www.openwall.com/lists/oss-security/2023/05/02/1 | web | |
| https://github.com/advisories/GHSA-4x9r-j582-cgr8 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-33891 changed 2025-10-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4x9r-j582-cgr8 changed 2026-06-09 | CC-BY-4.0 |
| NVD | CVE-2022-33891 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-236 changed 2026-06-08 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-SPARK-2022-33891 changed 2026-09-08 | Apache-2.0 |
| CISA KEV | CVE-2022-33891 changed 2023-03-07 | CC0-1.0 |