CVE-2022-31777
MEDIUM 5.4CVSS 3.1Apache Spark vulnerable to Log Injection
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.
- Published
- 1 Nov 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security@apache.org
- NVD status
- Modified
- Weakness
- CWE-74
- Also known as
- BIT-spark-2022-31777GHSA-43xg-8wmj-cw8hPYSEC-2022-42976
- Sources
- NVDJSONOSV GHSA-43xg-8wmj-cw8hJSONOSV PYSEC-2022-42976JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | apache | sparkcpe:2.3:a:apache:spark:*:*:*:*:*:*:*:* |
< 3.2.2 | 3.2.2 |
| NVD | apache | sparkcpe:2.3:a:apache:spark:3.3.0:*:*:*:*:*:*:* |
= 3.3.0 | |
| OSV | PyPI | pyspark | < 3.2.2 | 3.2.2 |
| OSV | PyPI | pyspark | >= 3.3.0, < 3.3.1 | 3.3.1 |
| OSV | Maven | org.apache.spark:spark-core_2.9.3 | all versions | |
| OSV | Maven | org.apache.spark:spark-core_2.13 | < 3.2.2 | 3.2.2 |
| OSV | Maven | org.apache.spark:spark-core_2.13 | >= 3.3.0, < 3.3.1 | 3.3.1 |
| OSV | Maven | org.apache.spark:spark-core_2.12 | < 3.2.2 | 3.2.2 |
| OSV | Maven | org.apache.spark:spark-core_2.12 | >= 3.3.0, < 3.3.1 | 3.3.1 |
| OSV | Maven | org.apache.spark:spark-core_2.11 | all versions | |
| OSV | Maven | org.apache.spark:spark-core_2.10 | all versions |
References
- http://www.openwall.com/lists/oss-security/2022/11/01/14 · Mailing List, WEB
- https://lists.apache.org/thread/60mgbswq2lsmrxykfxpqq13ztkm2ht6q · Mailing List, Third Party Advisory, WEB, ARTICLE
- https://nvd.nist.gov/vuln/detail/CVE-2022-31777 · ADVISORY
- https://github.com/apache/spark/commit/ad90195de56688ce0898691eb9d04297ab0871ad · WEB
- https://github.com/apache/spark · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-42976.yaml · WEB
- https://web.archive.org/web/20220728105026/https://issues.apache.org/jira/browse/SPARK-39505 · WEB
- https://github.com/advisories/GHSA-43xg-8wmj-cw8h · ADVISORY
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 1 Nov 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 1 Nov 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 1 Nov 2022)