CVE-2022-33891 — spark-parent_2.12
HIGHCVE-2022-33891 is a high-severity (CVSS 8.8) OS Command Injection vulnerability in org.apache.spark:spark-parent_2.12. It is in CISA's Known Exploited Vulnerabilities catalog (added 2023-03-07) — treat it as actively exploited and patch now. A fix is available for org.apache.spark:spark-parent_2.12 — see the affected versions and patch details below.
Apache Spark shell command injection vulnerability via Spark UI
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2023-03-07. Federal agencies were required to remediate by 2023-03-28.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2022-33891.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2022-33891 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,415 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.apache.spark:spark-parent_2.12☕org.apache.spark:spark-parent_2.12🐍pyspark🐍pysparkReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven, PyPI packages — download data is not available via public APIs for these ecosystems.
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.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.spark:spark-parent_2.12 | all versions | No fix |
| ☕Maven | org.apache.spark:spark-parent_2.12 | ≥ 3.1.1&&< 3.2.2 | 3.2.2org.apache.spark:spark-parent_2.12:3.2.2 |
| 🐍PyPI | pyspark | all versions | 3.1.3pip install --upgrade 'pyspark==3.1.3' |
| 🐍PyPI | pyspark | ≥ 3.2.0&&< 3.2.2 | 3.2.2pip install --upgrade 'pyspark==3.2.2' |
Affected Products
sparkapacheResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
The Apache Spark UI offers the possibility to enable ACLs via the config…
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.spark:spark-parent_2.12, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
No patched version of org.apache.spark:spark-parent_2.12 has shipped for CVE-2022-33891 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2022-33891
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2022-33891 -u https://target- Template
- Apache Spark UI - Remote Command Injection
- Severity
- high
- Impact
- Successful exploitation of this vulnerability can lead to unauthorized access, data leakage, and potential compromise of the entire system.
- Remediation
- Apply the latest security patches or updates provided by Apache Spark to fix the remote command injection vulnerability.
Template by ProjectDiscovery nuclei-templates (princechaddha), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2022-33891 in your dependencies?
Find it across Maven, PyPI, including transitive dependencies.