{
  "id": "CVE-2022-33891",
  "url": "https://poc.griffinguard.io/cve/CVE-2022-33891",
  "published_at": "2022-07-18T00:00:00Z",
  "title": "Apache Spark shell command injection vulnerability via Spark UI",
  "vendor": "Apache Software Foundation",
  "product": "Apache Spark",
  "cvss": {
    "score": 8.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": true,
    "added_at": "2023-03-07",
    "known_ransomware_campaign_use": "Unknown",
    "days_after_publication": 232
  },
  "first_poc": {
    "created_at": "2022-07-18T16:16:51Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 0.7,
    "repo": "W01fh4cker/cve-2022-33891",
    "source": "github"
  },
  "poc_repo_count": 7,
  "exploit_count": 2,
  "suspicious_repo_count": 1,
  "edge_device": null,
  "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.",
  "cwe": "CWE-78",
  "cvss_by_source": {
    "cisa-adp": 8.8
  },
  "repos": [
    {
      "repo": "IMHarman/CVE-2022-33891",
      "url": "https://github.com/IMHarman/CVE-2022-33891",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:15:13.872Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "K3ysTr0K3R/CVE-2022-33891-EXPLOIT",
      "url": "https://github.com/K3ysTr0K3R/CVE-2022-33891-EXPLOIT",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:15:13.872Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "XmasSnowISBACK/CVE-2022-33891",
      "url": "https://github.com/XmasSnowISBACK/CVE-2022-33891",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:15:13.872Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "llraudseppll/cve-2022-33891",
      "url": "https://github.com/llraudseppll/cve-2022-33891",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:15:13.872Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "west-wind/CVE-2022-33891",
      "url": "https://github.com/west-wind/CVE-2022-33891",
      "created_at": null,
      "first_seen_at": "2026-11-14T22:17:34.881Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "W01fh4cker/cve-2022-33891",
      "url": "https://github.com/W01fh4cker/cve-2022-33891",
      "created_at": "2022-07-18T16:16:51Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 51,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-03-18T11:45:48Z"
    },
    {
      "repo": "HuskyHacks/cve-2022-33891",
      "url": "https://github.com/HuskyHacks/cve-2022-33891",
      "created_at": "2022-07-19T18:52:12Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 88,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-11-17T14:15:29Z"
    },
    {
      "repo": "nanaao/CVE-2022-33891",
      "url": "https://github.com/nanaao/CVE-2022-33891",
      "created_at": "2022-07-20T05:15:28Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "fake",
      "kind": "fake",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-01-19T09:16:57Z"
    },
    {
      "repo": "AkbarTrilaksana/cve-2022-33891",
      "url": "https://github.com/AkbarTrilaksana/cve-2022-33891",
      "created_at": "2022-07-20T22:52:43Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2022-07-04T10:43:50Z"
    },
    {
      "repo": "AmoloHT/CVE-2022-33891",
      "url": "https://github.com/AmoloHT/CVE-2022-33891",
      "created_at": "2022-07-30T23:02:16Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 24,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-06-01T15:21:25Z"
    },
    {
      "repo": "DrLinuxOfficial/CVE-2022-33891",
      "url": "https://github.com/DrLinuxOfficial/CVE-2022-33891",
      "created_at": "2022-08-13T23:02:56Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-08-03T05:51:20Z"
    },
    {
      "repo": "Vulnmachines/Apache-spark-CVE-2022-33891",
      "url": "https://github.com/Vulnmachines/Apache-spark-CVE-2022-33891",
      "created_at": "2022-08-29T08:48:38Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "no",
      "kind": "writeup",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-02-13T11:46:24Z"
    },
    {
      "repo": "ps-interactive/lab_security_apache_spark_emulation_detection",
      "url": "https://github.com/ps-interactive/lab_security_apache_spark_emulation_detection",
      "created_at": "2022-12-06T23:44:30Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "no",
      "kind": "detection",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "code never talks to a target"
      ],
      "status": "analyzed",
      "owner_created_at": "2018-01-10T21:50:05Z"
    },
    {
      "repo": "devengpk/Apache-zero-days",
      "url": "https://github.com/devengpk/Apache-zero-days",
      "created_at": "2023-01-05T18:28:20Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-07-19T13:20:43Z"
    },
    {
      "repo": "elsvital/cve-2022-33891-fix",
      "url": "https://github.com/elsvital/cve-2022-33891-fix",
      "created_at": "2023-11-26T13:09:28Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "fake",
      "kind": "fake",
      "suspicion_score": 100,
      "suspicious": true,
      "suspicion_reasons": [
        "pipes a download into a shell / encoded PowerShell in spark-3.2.0-no-patch/dev/appveyor-install-dependencies.ps1",
        "pipes a download into a shell / encoded PowerShell in spark-3.2.0-no-patch/dev/create-release/spark-rm/Dockerfile",
        "contains archives (spark-3.2.0-no-patch/core/src/test/resources/TestUDTF.jar, spark-3.2.0-no-patch/docs/img/cluster-overview.pptx, spark-3.2.0-no-patch/docs/img/ml-Pipelines.pptx)",
        "installs a package from a URL in spark-3.2.0-no-patch/dev/create-release/vote.tmpl",
        "large base64 blob in code in spark-3.2.0-no-patch/docs/js/vendor/anchor.min.js"
      ],
      "status": "analyzed",
      "owner_created_at": "2013-07-02T18:45:02Z"
    },
    {
      "repo": "asepsaepdin/CVE-2022-33891",
      "url": "https://github.com/asepsaepdin/CVE-2022-33891",
      "created_at": "2025-01-30T17:05:01Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-01-13T14:15:49Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "",
        "product": "org.apache.spark:spark-parent_2.12",
        "ranges": [
          "\u003c= 3.0.3"
        ],
        "fixed_in": null,
        "ecosystem": "Maven",
        "advisory": "GHSA-4x9r-j582-cgr8"
      },
      {
        "vendor": "",
        "product": "org.apache.spark:spark-parent_2.12",
        "ranges": [
          "\u003e= 3.1.1, \u003c 3.2.2"
        ],
        "fixed_in": [
          "3.2.2"
        ],
        "ecosystem": "Maven",
        "advisory": "GHSA-4x9r-j582-cgr8"
      },
      {
        "vendor": "",
        "product": "pyspark",
        "ranges": [
          "\u003c 3.1.3"
        ],
        "fixed_in": [
          "3.1.3"
        ],
        "ecosystem": "PyPI",
        "advisory": "GHSA-4x9r-j582-cgr8"
      },
      {
        "vendor": "",
        "product": "pyspark",
        "ranges": [
          "\u003e= 3.2.0, \u003c 3.2.2"
        ],
        "fixed_in": [
          "3.2.2"
        ],
        "ecosystem": "PyPI",
        "advisory": "GHSA-4x9r-j582-cgr8"
      }
    ],
    "upgrade": [
      "Upgrade org.apache.spark:spark-parent_2.12 to 3.2.2 or later.",
      "Upgrade pyspark to 3.1.3 or later.",
      "Upgrade pyspark to 3.2.2 or later."
    ]
  },
  "exploit_refs": [
    {
      "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_spark_rce_cve_2022_33891.rb",
      "source": "metasploit",
      "title": "Metasploit exploit: Apache Spark Unauthenticated Command Injection RCE (exploit/linux/http/apache_spark_rce_cve_2022_33891)",
      "published_at": "2022-08-25T17:54:53Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    },
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-33891.yaml",
      "source": "nuclei",
      "title": "nuclei template: Apache Spark UI - Remote Command Injection",
      "published_at": "2023-04-27T04:28:59Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/",
      "query_markers": [
        "doAs='testing"
      ],
      "ports": [
        8080
      ],
      "user_agents": [
        "CVE-2022-33891 POC"
      ],
      "protocol": "http",
      "repos": [
        "AkbarTrilaksana/cve-2022-33891",
        "HuskyHacks/cve-2022-33891",
        "asepsaepdin/CVE-2022-33891",
        "devengpk/Apache-zero-days"
      ],
      "repo_count": 4,
      "confidence": 0.7,
      "evidence": [
        "AkbarTrilaksana/cve-2022-33891/poc.py:23",
        "HuskyHacks/cve-2022-33891/poc.py:37",
        "asepsaepdin/CVE-2022-33891/poc.py:23",
        "devengpk/Apache-zero-days/exploit.py:37"
      ]
    }
  ],
  "rules": []
}
