{"answers":{"affected":"10 open source packages ship an affected version, including org.apache.spark:spark-parent_2.12, spark and pyspark. It affects 1 product.","exploited":"Yes. Attackers have exploited CVE-2022-33891 in the wild since at least 7 Mar 2023.","fix":"Upgrade org.apache.spark:spark-parent_2.12 to 3.2.2 or later. US federal agencies must fix it by 28 Mar 2023.","what":"CVE-2022-33891 is a high-severity command injection vulnerability in Apache Spark, published on 18 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-33891 and fix it if it is affected.\n\nWhat it is: CVE-2022-33891 is a high-severity command injection vulnerability in Apache Spark, published on 18 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2022-33891 in the wild since at least 7 Mar 2023.\n\nAffected packages and fixed versions:\n- org.apache.spark:spark-parent_2.12 (Maven): affected all versions up to 3.0.3; no fix listed\n- org.apache.spark:spark-parent_2.12 (Maven): affected all versions up to 3.0.3; no fix listed\n- org.apache.spark:spark-parent_2.12 (Maven): affected from 3.1.1; fixed in 3.2.2\n- org.apache.spark:spark-parent_2.12 (Maven): affected from 3.1.1; fixed in 3.2.2\n- spark (Bitnami): affected all versions; fixed in 3.0.4, 3.1.3, 3.2.2\n- pyspark (PyPI): affected all versions; fixed in 3.1.3, 3.2.2\n- pyspark (PyPI): affected all versions; fixed in 3.1.3\n- pyspark (PyPI): affected all versions; fixed in 3.1.3\n- pyspark (PyPI): affected from 3.2.0; fixed in 3.2.2\n- pyspark (PyPI): affected from 3.2.0; fixed in 3.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-33891/ (Markdown: https://insights.sbomify.com/CVE-2022-33891/index.md)","id":"CVE-2022-33891","markdown":"https://insights.sbomify.com/CVE-2022-33891/index.md","name":"CVE-2022-33891","record":{"aliases":["BIT-spark-2022-33891","GHSA-4x9r-j582-cgr8","PYSEC-2022-236"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Apache Spark","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary shell commands via Spark UI impersonation when ACLs are enabled, requiring an upgrade to secure the cluster.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"spark","vendor":"apache"}],"cvss":{"score":8.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"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.","ecosystems":["Bitnami","Maven","PyPI"],"exploits":{"exploitdb":0,"first_seen":"2022-07-18","github_poc":10,"max_poc_stars":88,"metasploit":1,"nuclei":1,"refs":[{"date":"2022-07-19T18:52:12Z","kind":"github_poc","ref":"https://github.com/HuskyHacks/cve-2022-33891","stars":88,"title":"Apache Spark Shell Command Injection Vulnerability"},{"date":"2022-07-18T16:16:51Z","kind":"github_poc","ref":"https://github.com/W01fh4cker/cve-2022-33891","stars":51,"title":"cve-2022-33891-poc"},{"date":"2022-07-30T23:02:16Z","kind":"github_poc","ref":"https://github.com/AmoloHT/CVE-2022-33891","stars":24,"title":"「💥」CVE-2022-33891 - Apache Spark Command Injection"},{"date":"2022-07-20T22:52:43Z","kind":"github_poc","ref":"https://github.com/AkbarTrilaksana/cve-2022-33891","stars":3,"title":null},{"date":"2022-08-13T23:02:56Z","kind":"github_poc","ref":"https://github.com/DrLinuxOfficial/CVE-2022-33891","stars":1,"title":"CVE-2022-33891 Exploit For Apache Spark"},{"date":"2022-08-29T08:48:38Z","kind":"github_poc","ref":"https://github.com/Vulnmachines/Apache-spark-CVE-2022-33891","stars":1,"title":"Apache Spark RCE - CVE-2022-33891"},{"date":"2022-07-18","kind":"metasploit","ref":"exploit/linux/http/apache_spark_rce_cve_2022_33891","stars":null,"title":"Apache Spark Unauthenticated Command Injection RCE"},{"date":"2022-07-20T05:15:28Z","kind":"github_poc","ref":"https://github.com/nanaao/CVE-2022-33891","stars":0,"title":"PoC for CVE-2022-33891"}],"tier":"exploited"},"has_fix":true,"headline":"Apache Spark Command Injection","id":"CVE-2022-33891","indexable":true,"kev":{"dateAdded":"2023-03-07","dueDate":"2023-03-28","knownRansomwareCampaignUse":"Unknown","product":"Spark","requiredAction":"Apply updates per vendor instructions.","vendorProject":"Apache","vulnerabilityName":"Apache Spark Command Injection Vulnerability"},"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"command_injection","year":"2022"},"n_packages":10,"n_references":3,"next":{"headline":"Path traversal in Intel(R) Quartus Prime Pro and Standard edition software","id":"CVE-2022-33892"},"packages":[{"ecosystem":"Bitnami","fixed":["3.0.4","3.1.3","3.2.2"],"introduced":["0","3.1.1","3.2.0"],"last_affected":[],"package":"spark","purl":"pkg:bitnami/spark","source":"BIT-spark-2022-33891"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["3.0.3"],"package":"org.apache.spark:spark-parent_2.12","purl":null,"source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["3.0.3"],"package":"org.apache.spark:spark-parent_2.12","purl":"pkg:maven/org.apache.spark/spark-parent_2.12","source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"Maven","fixed":["3.2.2"],"introduced":["3.1.1"],"last_affected":[],"package":"org.apache.spark:spark-parent_2.12","purl":null,"source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"Maven","fixed":["3.2.2"],"introduced":["3.1.1"],"last_affected":[],"package":"org.apache.spark:spark-parent_2.12","purl":"pkg:maven/org.apache.spark/spark-parent_2.12","source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"PyPI","fixed":["3.1.3","3.2.2"],"introduced":["0","3.2.0"],"last_affected":[],"package":"pyspark","purl":"pkg:pypi/pyspark","source":"PYSEC-2022-236"},{"ecosystem":"PyPI","fixed":["3.1.3"],"introduced":["0"],"last_affected":[],"package":"pyspark","purl":null,"source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"PyPI","fixed":["3.1.3"],"introduced":["0"],"last_affected":[],"package":"pyspark","purl":"pkg:pypi/pyspark","source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"PyPI","fixed":["3.2.2"],"introduced":["3.2.0"],"last_affected":[],"package":"pyspark","purl":null,"source":"GHSA-4x9r-j582-cgr8"},{"ecosystem":"PyPI","fixed":["3.2.2"],"introduced":["3.2.0"],"last_affected":[],"package":"pyspark","purl":"pkg:pypi/pyspark","source":"GHSA-4x9r-j582-cgr8"}],"prev":{"headline":"Memory corruption in Autodesk® Design Review,","id":"CVE-2022-33890"},"products":["Apache Spark"],"published":"2022-07-18","related":[{"cvss_score":9.8,"headline":"Improper Authentication in Apache Spark","id":"CVE-2020-9480","kev_date_added":null,"published":"2020-06-23"},{"cvss_score":9.8,"headline":"Remote Code Execution in spark-core","id":"CVE-2018-17190","kev_date_added":null,"published":"2018-11-19"},{"cvss_score":9.1,"headline":"HTTP Request Smuggling in Netty","id":"CVE-2019-20445","kev_date_added":null,"published":"2020-01-29"},{"cvss_score":8.8,"headline":"Apache Spark: Spark History Server Code Execution Vulnerability","id":"CVE-2025-54920","kev_date_added":null,"published":"2026-03-14"},{"cvss_score":8.8,"headline":"Apache Spark: Shell command injection via Spark UI","id":"CVE-2023-32007","kev_date_added":null,"published":"2023-05-02"},{"cvss_score":7.8,"headline":"Apache Spark Deserialization of Untrusted Data vulnerability","id":"CVE-2017-12612","kev_date_added":null,"published":"2017-09-13"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["Apache Software Foundation"]},"summary":"Attackers can execute arbitrary shell commands via Spark UI impersonation when ACLs are enabled, requiring an upgrade to secure the cluster.","url":"https://insights.sbomify.com/CVE-2022-33891/"}