Wiz Agents & Workflows are here

CVE-2025-54920
Java vulnerability analysis and mitigation

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://:/", "info": { "hive.metastore.uris": "thrift://:" } }

  1. Start the Spark History Server with logs pointing to the modified directory.

  2. 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.


SourceNVD

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-34361CRITICAL9.3
  • JavaJava
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation
NoYesMar 31, 2026
CVE-2026-34214HIGH7.7
  • JavaJava
  • io.trino:trino-iceberg
NoYesMar 31, 2026
CVE-2026-34359HIGH7.4
  • JavaJava
  • ca.uhn.hapi.fhir:org.hl7.fhir.core
NoYesMar 31, 2026
CVE-2026-34237MEDIUM6.1
  • JavaJava
  • io.modelcontextprotocol.sdk:mcp-core
NoYesMar 31, 2026
CVE-2026-34360MEDIUM5.8
  • JavaJava
  • ca.uhn.hapi.fhir:org.hl7.fhir.core
NoYesMar 31, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management