{"schemaVersion":3,"id":"CVE-2022-31777","aliases":["GHSA-43xg-8wmj-cw8h","BIT-spark-2022-31777","PYSEC-2022-42976"],"status":"published","duplicateOf":null,"title":null,"description":"A stored cross-site scripting (XSS) vulnerability in Apache Spark 3.2.1 and earlier, and 3.3.0, allows remote attackers to execute arbitrary JavaScript in the web browser of a user, by including a malicious payload into the logs which would be returned in logs rendered in the UI.","dates":{"published":"2022-11-01T00:00:00.000Z","modified":"2025-05-06T03:36:31.908Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.4,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":5.9,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Maven","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":5.9,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01615,"percentile":0.75614,"severity":"low","asOf":"2026-10-18T00:00:00.000Z","change":{"pp":0.032000000000000084,"baselineDate":"2026-09-18T00:00:00.000Z","baselineScore":0.01583},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01615,"percentile":0.75614}],"last30":[{"date":"2026-09-18T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01583,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01615,"percentile":0.75614}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","description":"The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/74.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.3.0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.2.1 and earlier, ≤ 3.2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"3.3.0 | ≥ 3.2.1 and earlier, ≤ 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.2.2","noFixRecorded":false,"fixedIn":null},{"text":"3.3.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.2.2 | 3.3.0","eol":{"isEol":true,"eolDate":"2023-12-09T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"3.3","label":"3.3","eolFrom":"2023-12-09T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":"3.3.4"},"product":{"name":"apache-spark","label":"Apache Spark","category":"server-app"}},"hubHref":"/vendor/apache/spark"},{"vendor":"org.apache.spark","product":"spark-core_2.10","name":"org.apache.spark:spark-core_2.10","label":"spark-core_2.10","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-core_2.10","purlType":"maven","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"org.apache.spark","product":"spark-core_2.11","name":"org.apache.spark:spark-core_2.11","label":"spark-core_2.11","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-core_2.11","purlType":"maven","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"org.apache.spark","product":"spark-core_2.12","name":"org.apache.spark:spark-core_2.12","label":"spark-core_2.12","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-core_2.12","purlType":"maven","versions":[{"text":"< 3.2.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.3.0, < 3.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.2.2 | ≥ 3.3.0, < 3.3.1","eol":null,"hubHref":null},{"vendor":"org.apache.spark","product":"spark-core_2.13","name":"org.apache.spark:spark-core_2.13","label":"spark-core_2.13","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-core_2.13","purlType":"maven","versions":[{"text":"< 3.2.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.3.0, < 3.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.2.2 | ≥ 3.3.0, < 3.3.1","eol":null,"hubHref":null},{"vendor":"org.apache.spark","product":"spark-core_2.9.3","name":"org.apache.spark:spark-core_2.9.3","label":"spark-core_2.9.3","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.apache.spark/spark-core_2.9.3","purlType":"maven","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","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.2.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.3.0, < 3.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.2.2 | ≥ 3.3.0, < 3.3.1","eol":null,"hubHref":null}],"affectedCount":8,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://lists.apache.org/thread/60mgbswq2lsmrxykfxpqq13ztkm2ht6q","label":"lists.apache.org/thread/60mgbswq2lsmrxykfxpqq13ztkm2ht6q","hostname":"lists.apache.org","tags":["WEB","ARTICLE","Mailing List","Third Party Advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2022/11/01/14","label":"www.openwall.com/lists/oss-security/2022/11/01/14","hostname":"www.openwall.com","tags":["Mailing List","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31777","label":"nvd.nist.gov/vuln/detail/CVE-2022-31777","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/apache/spark/commit/ad90195de56688ce0898691eb9d04297ab0871ad","label":"github.com/apache/spark/commit/ad90195de56688ce0898691eb9d04297ab0871ad","hostname":"github.com","tags":["WEB"]},{"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-42976.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-42976.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://web.archive.org/web/20220728105026/https://issues.apache.org/jira/browse/SPARK-39505","label":"web.archive.org/web/20220728105026/https://issues.apache.org/jira/browse/SPARK-39505","hostname":"web.archive.org","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-43xg-8wmj-cw8h","label":"github.com/advisories/GHSA-43xg-8wmj-cw8h","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-11-01T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-05-06T03:36:31.908Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":22,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T04:41:13.738Z","stale":false,"partial":false}}