← Vulnerability feed

Vulnerability record · CVE-2022-33891 · published 18 July 2022

CVE-2022-33891: Apache Spark UI ACL impersonation leads to OS command injection

Apache · Spark

Apache Spark's UI ACL feature (spark.acls.enable) contains a flaw in HttpSecurityFilter where a user can supply an arbitrary username to impersonate another user. That impersonated identity reaches a permission check that builds a Unix shell command from user input, allowing arbitrary command execution as the Spark process user.

8.8 CVSS 3.1 High CISA KEV since 7 Mar 2023 EPSS 93% · top 0.2% CWE-78 · OS command injection
8.8CVSS 3.1 base score
93%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
1Affected product versions listed by NVD
7References, 2 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityIt is in CISA KEV with a near-maximum EPSS score and public exploit code, and it yields remote command execution on a widely deployed data processing platform.

What it is

Apache Spark's UI ACL feature (spark.acls.enable) contains a flaw in HttpSecurityFilter where a user can supply an arbitrary username to impersonate another user. That impersonated identity reaches a permission check that builds a Unix shell command from user input, allowing arbitrary command execution as the Spark process user.

Impact

An attacker gains arbitrary shell command execution with the privileges of the account running Spark, enabling data theft, lateral movement, or full host compromise.

Attack surface

Reachable over the network through the Spark UI when ACLs are enabled; the CVSS vector indicates low privileges are required and no user interaction, though a public exploit reference describes the issue as unauthenticated.

Exploitation

CISA added it to KEV on 2023-03-07 with a 2023-03-28 remediation due, and EPSS shows a 30-day probability of 0.93076 (99.8th percentile); public exploit code is referenced.

What to do

  • Upgrade Apache Spark to a version later than 3.2.1 (or the vendor-fixed release for your 3.0/3.1/3.2 branch) as directed by Apache.
  • If patching is not immediately possible, disable spark.acls.enable or restrict Spark UI network access to trusted hosts only.
  • Run the Spark process under a low-privilege, non-interactive service account to limit command execution impact.
  • Place the Spark UI behind an authenticating reverse proxy and block direct external exposure.

Detection

  • Monitor Spark UI access logs for requests containing suspicious username parameters or shell metacharacters in ACL-related fields.
  • Alert on child processes spawned by the Spark JVM (java) that invoke /bin/sh, bash, or other shells.
  • Hunt for outbound connections or file writes originating from the Spark host shortly after UI requests.
  • Correlate Spark UI request patterns with process creation telemetry on the Spark master and worker nodes.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2022-33891 to the Known Exploited Vulnerabilities catalog on 7 March 2023 as "Apache Spark Command Injection Vulnerability". Required action: Apply updates per vendor instructions. Federal deadline 28 March 2023.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2022-33891 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.9CVE-2023-22946Apache spark improper privilege management vulnerabilityIn Apache Spark versions prior to 3.4.0, applications using spark-submit can specify a 'proxy-user' to run as, limiting privileges. The application c…EPSS 1.1%9.8CVE-2020-9480Apache spark missing authentication for critical function vulnerabilityIn Apache Spark 2.4.5 and earlier, a standalone resource manager's master may be configured to require authentication (spark.authenticate) via a shar…EPSS 29%9.8CVE-2018-17190Apache spark vulnerabilityIn all versions of Apache Spark, its standalone resource manager accepts code to execute on a 'master' host, that then runs that code on 'worker' hos…EPSS 8.8%9.1CVE-2019-20445Netty http request smuggling vulnerabilityHttpObjectDecoder.java in Netty before 4.1.44 allows a Content-Length header to be accompanied by a second Content-Length header, or by a Transfer-En…EPSS 13%8.8CVE-2025-54920Apache spark deserialization of untrusted data vulnerabilityThis issue affects Apache Spark: before 3.5.7 and 4.0.1. Users are recommended to upgrade to version 3.5.7 or 4.0.1 and above, which fixes the issue.…EPSS 5.3%8.8CVE-2023-32007Apache Spark UI ACL impersonation leads to shell command injectionWhen spark.acls.enable is on, a code path in Apache Spark's HttpSecurityFilter lets a user impersonate an arbitrary username. That impersonated name …EPSS 76%analysed7.8CVE-2017-12612Apache spark deserialization of untrusted data vulnerabilityIn Apache Spark 1.6.0 until 2.1.1, the launcher API performs unsafe deserialization of data received by its socket. This makes applications launched …EPSS 0.73%7.5CVE-2021-38296Apache spark authentication bypass by capture-replay vulnerabilityApache Spark supports end-to-end encryption of RPC connections via "spark.authenticate" and "spark.network.crypto.enabled". In versions 3.1.2 and ear…EPSS 1.8%

Source: NIST National Vulnerability Database (record CVE-2022-33891), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.