CVE-2022-33891: Apache Spark Command Injection
Apache Spark · listed in the CISA catalog of actively exploited vulnerabilities since 2023-03-07.
- CVSS v3.1 (CISA ADP)
- 8.8
- high
- EPSS (exploit probability, 30 days)
- 93%
- higher than 99.8% of all CVEs
- Added to CISA KEV
- 2023-03-07
- US federal due date 2023-03-28
- Automatable (CISA SSVC)
- no
- technical impact: total
CVE-2022-33891 explained
CVE-2022-33891 is a command injection flaw in the Apache Spark UI. When ACLs are enabled through the spark.acls.enable option, a code path in HttpSecurityFilter can let a user impersonate others and trigger shell command execution. CISA lists it as known to be exploited, so affected Spark deployments should be treated as a priority.
Impact
An attacker with low privileges and network access to the Spark UI can execute arbitrary shell commands as the user Spark runs as. No user interaction is needed. This only applies when ACLs are enabled. CISA rates the technical impact as total, meaning full control of the affected component, but not automatable at scale. Confidentiality, integrity and availability are all highly affected.
Who is affected
The CVE record lists Apache Software Foundation Apache Spark versions 3.0.3 and earlier, 3.1.1 to 3.1.2, and 3.2.0 to 3.2.1 as affected. The CVE record names no fixed version. Check the Apache vendor advisory for the releases that contain the fix.
Written with AI from the data on this page and checked against it automatically.
Official 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.
CISA required action: Apply updates per vendor instructions.
CISA notes
Affected and fixed versions
From the CVE record published by the vendor or CVE numbering authority.
- Apache Software Foundation Apache SparkAffectedFixed in
- ≥ 3.0.3 and earlier, ≤ 3.0.3
- ≥ 3.1.1 to 3.1.2, ≤ 3.1.2
- ≥ 3.2.0 to 3.2.1, ≤ 3.2.1
not stated
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache Spark |
| not stated |
How to fix it
- The CVE record names no fixed version – check the vendor advisory and CISA's required action for updates and mitigations.
- Vendor advisory: lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc
- CISA's deadline for US federal agencies: 2023-03-28 (passed) – a useful benchmark for everyone else, too.
Workaround: Upgrade to supported Apache Spark maintenance release 3.1.3, 3.2.2, or 3.3.0 or later
What to do
- Follow the Apache vendor advisory and upgrade Spark to a release that the vendor states contains the fix.
- Apply updates per vendor instructions, as CISA requires for this known exploited vulnerability.
- Restrict network access to the Spark UI to trusted administrators and keep it off the internet.
- Run Spark under a dedicated account with minimal privileges to limit the effect of command execution.
- Review Spark hosts and logs for unexpected commands or processes that could indicate compromise.
The CVE record names no fixed version. Consult the Apache vendor advisory for the corrected Spark releases and follow CISA's required action to apply updates per vendor instructions. Until you can upgrade, limit network access to the Spark UI to trusted users and monitor Spark hosts for signs of compromise.
Written with AI from the data on this page and checked against it automatically.
CISA's assessment (SSVC)
- Exploitation
- Exploited in the wild
- Automatable
- No – each attack needs manual steps
- Technical impact
- Total – full control of the component or total information disclosure
Weakness: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Questions about CVE-2022-33891
- Is every Spark installation in the affected versions exposed?
- The flaw is reachable when ACLs are enabled via the spark.acls.enable option. The impersonation path in HttpSecurityFilter only applies in that configuration. Upgrading is still the recommended fix.
- Is this vulnerability being exploited?
- Yes. CISA added CVE-2022-33891 to its Known Exploited Vulnerabilities catalog on 2023-03-07, with a US federal due date of 2023-03-28. Ransomware use is listed as unknown.
- What privileges do injected commands run with?
- Commands run as the user account Spark is currently running as. Running Spark under a low-privilege account reduces the damage an attacker can cause.
Written with AI from the data on this page and checked against it automatically.
References
Trackers and catalogs
Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-22. Always confirm with the vendor's or distribution's advisory before patching.