{"schemaVersion":3,"id":"CVE-2022-33891","aliases":["GHSA-4x9r-j582-cgr8","BIT-spark-2022-33891","PYSEC-2022-236"],"status":"published","duplicateOf":null,"title":"Apache Spark Command Injection Vulnerability","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.","dates":{"published":"2022-07-18T00:00:00.000Z","modified":"2025-10-21T23:15:38.160Z","reserved":null,"kevAdded":["2023-03-07T00:00:00.000Z"],"kevDue":["2023-03-28T00:00:00.000Z"]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.7,"severity":"high","vector":"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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H","exploitability":7.2,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Maven","score":8.7,"severity":"high","vector":"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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Maven","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:H","exploitability":7.2,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.93244,"percentile":0.99836,"severity":"critical","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.16800000000000148,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.93076},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.93244,"percentile":0.99836}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.93076,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.93244,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.93244,"percentile":0.99836}]},"kev":{"state":"listed","entries":[{"source":"cisa","sourceLabel":"CISA","dateAdded":"2023-03-07T00:00:00.000Z","dueDate":"2023-03-28T00:00:00.000Z","requiredAction":"Apply updates per vendor instructions.","name":"Apache Spark Command Injection Vulnerability","description":"Apache Spark contains a command injection vulnerability via Spark User Interface (UI) when Access Control Lists (ACLs) are enabled.","notes":[{"type":"url","href":"https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc","label":"lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc"},{"type":"url","href":"https://nvd.nist.gov/vuln/detail/CVE-2022-33891","label":"nvd.nist.gov/vuln/detail/CVE-2022-33891"}],"vendor":"Apache","product":"Spark","ransomware":false,"ransomwareUse":"Unknown","exploitationType":null}],"listedCount":1,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":true,"entry":{"source":"cisa","sourceLabel":"CISA","dateAdded":"2023-03-07T00:00:00.000Z","dueDate":"2023-03-28T00:00:00.000Z","requiredAction":"Apply updates per vendor instructions.","name":"Apache Spark Command Injection Vulnerability","description":"Apache Spark contains a command injection vulnerability via Spark User Interface (UI) when Access Control Lists (ACLs) are enabled.","notes":[{"type":"url","href":"https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc","label":"lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc"},{"type":"url","href":"https://nvd.nist.gov/vuln/detail/CVE-2022-33891","label":"nvd.nist.gov/vuln/detail/CVE-2022-33891"}],"vendor":"Apache","product":"Spark","ransomware":false,"ransomwareUse":"Unknown","exploitationType":null}},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_1F27C00CD61077CC","name":"Exploit Reference (packetstormsecurity.com)","source":"reference","url":"http://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"MSF_EXPLOIT_LINUX_HTTP_APACHE_SPARK_RCE_CVE_2022_33891","name":"Apache Spark Unauthenticated Command Injection RCE","source":"metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploit/linux/http/apache_spark_rce_cve_2022_33891.rb","maturity":"weaponized","reliabilityScore":1,"verified":true,"type":"remote","platforms":[],"requiresAuth":false,"exploitdb":null,"metasploit":{"fullname":"exploit/linux/http/apache_spark_rce_cve_2022_33891","rank":"600","rankName":"excellent","postAuth":false,"check":true,"stability":["crash-safe"],"sideEffects":["ioc-in-logs"],"reliability":["repeatable-session"]}}],"exploitCount":2,"weaknesses":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","description":"The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/78.html"}],"affected":[{"vendor":"apache software foundation","product":"apache spark","name":"Apache Spark","label":"apache spark","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 3.0.3 and earlier, ≤ 3.0.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.1 to 3.1.2, ≤ 3.1.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.0 to 3.2.1, ≤ 3.2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 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","eol":null,"hubHref":"/vendor/apache_software_foundation/apache_spark"},{"vendor":"apache","product":"spark","name":"Spark","label":"spark","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 3.0.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.1, ≤ 3.1.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.0, ≤ 3.2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 3.0.3 | ≥ 3.1.1, ≤ 3.1.2 | ≥ 3.2.0, ≤ 3.2.1","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"apache-spark","label":"Apache Spark","category":"server-app"}},"hubHref":"/vendor/apache/spark"},{"vendor":"org.apache.spark","product":"spark-parent_2.12","name":"org.apache.spark:spark-parent_2.12","label":"spark-parent_2.12","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-parent_2.12","purlType":"maven","versions":[{"text":"≤ 3.0.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.1.1, < 3.2.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 3.0.3 | ≥ 3.1.1, < 3.2.2","eol":null,"hubHref":null},{"vendor":"PyPI","product":"pyspark","name":"pyspark","label":"pyspark","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/pyspark","purlType":"pypi","versions":[{"text":"< 3.1.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.0, < 3.2.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.3 | ≥ 3.2.0, < 3.2.2","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc","label":"lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc","hostname":"lists.apache.org","tags":["WEB","Mailing List","Third Party Advisory"]},{"url":"http://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html","label":"packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html","hostname":"packetstormsecurity.com","tags":["WEB","Exploit","Third Party Advisory","VDB Entry"]},{"url":"http://www.openwall.com/lists/oss-security/2023/05/02/1","label":"www.openwall.com/lists/oss-security/2023/05/02/1","hostname":"www.openwall.com","tags":["Mailing List","WEB","Third Party Advisory"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-33891","label":"www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-33891","hostname":"www.cisa.gov","tags":["Government Resource","WEB","Third Party Advisory","US Government Resource"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-33891","label":"nvd.nist.gov/vuln/detail/CVE-2022-33891","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/apache/spark","label":"github.com/apache/spark","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-236.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-236.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html","label":"packetstormsecurity.com/files/168309/Apache-Spark-Unauthenticated-Command-Injection.html","hostname":"packetstormsecurity.com","tags":["WEB"]},{"url":"https://www.openwall.com/lists/oss-security/2023/05/02/1","label":"www.openwall.com/lists/oss-security/2023/05/02/1","hostname":"www.openwall.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-4x9r-j582-cgr8","label":"github.com/advisories/GHSA-4x9r-j582-cgr8","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["SUSE-SU-2023:0070-1"],"duplicates":[],"related":["SUSE-SU-2023:0070-1"]},"timeline":[{"kind":"published","date":"2022-07-18T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"kev-added","date":"2023-03-07T00:00:00.000Z","label":"Added to CISA KEV","detail":"Apache Spark Command Injection Vulnerability","source":"cisa"},{"kind":"kev-due","date":"2023-03-28T00:00:00.000Z","label":"CISA remediation due","detail":"Apply updates per vendor instructions.","source":"cisa"},{"kind":"modified","date":"2025-10-21T23:15:38.160Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":85,"level":"critical","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T11:57:19.002Z","stale":false,"partial":false}}