# CVE-2025-55039: Apache Spark has Inadequate Encryption Strength

> Man-in-the-middle attackers can modify encrypted RPC traffic in Apache Spark when using the default unauthenticated AES-CTR cipher, compromising workflow integrity.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Oct 2025
- **Updated:** 4 Nov 2025
- **Also known as:** GHSA-6p6v-m64v-jx8q, PYSEC-2025-184

## What is CVE-2025-55039?

CVE-2025-55039 is a medium-severity vulnerability in Apache Spark, published on 15 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

This issue affects Apache Spark versions before  3.4.4, 3.5.2 and 4.0.0.

Apache Spark versions before 4.0.0, 3.5.2 and 3.4.4 use an insecure default network encryption cipher for RPC communication between nodes.

When spark.network.crypto.enabled is set to true (it is set to false by default), but spark.network.crypto.cipher is not explicitly configured, Spark defaults to AES in CTR mode (AES/CTR/NoPadding), which provides encryption without authentication.

This vulnerability allows a man-in-the-middle attacker to modify encrypted RPC traffic undetected by flipping bits in ciphertext, potentially compromising heartbeat messages or application data and affecting the integrity of Spark workflows.

To mitigate this issue, users should either configure spark.network.crypto.cipher to AES/GCM/NoPadding to enable authenticated encryption or

enable SSL encryption by setting spark.ssl.enabled to true, which provides stronger transport security.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature), CWE-326 (Inadequate Encryption Strength)

## Which versions are affected by CVE-2025-55039?

13 open source packages ship an affected version, including org.apache.spark:spark-network-common_2.12, org.apache.spark:spark-network-common_2.13 and pyspark. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.spark:spark-network-common_2.12` | Maven | All versions | 3.4.4 |
| `org.apache.spark:spark-network-common_2.12` | Maven | All versions | 3.4.4 |
| `org.apache.spark:spark-network-common_2.12` | Maven | From 3.5.0 | 3.5.2 |
| `org.apache.spark:spark-network-common_2.12` | Maven | From 3.5.0 | 3.5.2 |
| `org.apache.spark:spark-network-common_2.13` | Maven | All versions | 3.4.4 |
| `org.apache.spark:spark-network-common_2.13` | Maven | All versions | 3.4.4 |
| `org.apache.spark:spark-network-common_2.13` | Maven | From 3.5.0 | 3.5.2 |
| `org.apache.spark:spark-network-common_2.13` | Maven | From 3.5.0 | 3.5.2 |
| `pyspark` | PyPI | All versions | 3.4.4, 3.5.2 |
| `pyspark` | PyPI | All versions | 3.4.4 |
| `pyspark` | PyPI | All versions | 3.4.4 |
| `pyspark` | PyPI | From 3.5.0 | 3.5.2 |
| `pyspark` | PyPI | From 3.5.0 | 3.5.2 |

Products: Apache Spark.

## How do I fix CVE-2025-55039?

Upgrade org.apache.spark:spark-network-common_2.12 to a fixed version for your release line: 3.4.4 or 3.5.2.

## Is CVE-2025-55039 being exploited?

There is no known exploitation of CVE-2025-55039 in the wild and no public exploit code.

## Other vulnerabilities in Apache Spark

- [CVE-2022-33891](https://insights.sbomify.com/CVE-2022-33891/): Apache Spark Command Injection (high 8.8, exploited in the wild)
- [CVE-2020-9480](https://insights.sbomify.com/CVE-2020-9480/): Improper Authentication in Apache Spark (critical 9.8)
- [CVE-2018-17190](https://insights.sbomify.com/CVE-2018-17190/): Remote Code Execution in spark-core (critical 9.8)
- [CVE-2019-20445](https://insights.sbomify.com/CVE-2019-20445/): HTTP Request Smuggling in Netty (critical 9.1)
- [CVE-2025-54920](https://insights.sbomify.com/CVE-2025-54920/): Apache Spark: Spark History Server Code Execution Vulnerability (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-55039 and fix it if it is affected.

What it is: CVE-2025-55039 is a medium-severity vulnerability in Apache Spark, published on 15 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-55039 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.spark:spark-network-common_2.12 (Maven): affected all versions; fixed in 3.4.4
- org.apache.spark:spark-network-common_2.12 (Maven): affected all versions; fixed in 3.4.4
- org.apache.spark:spark-network-common_2.12 (Maven): affected from 3.5.0; fixed in 3.5.2
- org.apache.spark:spark-network-common_2.12 (Maven): affected from 3.5.0; fixed in 3.5.2
- org.apache.spark:spark-network-common_2.13 (Maven): affected all versions; fixed in 3.4.4
- org.apache.spark:spark-network-common_2.13 (Maven): affected all versions; fixed in 3.4.4
- org.apache.spark:spark-network-common_2.13 (Maven): affected from 3.5.0; fixed in 3.5.2
- org.apache.spark:spark-network-common_2.13 (Maven): affected from 3.5.0; fixed in 3.5.2
- pyspark (PyPI): affected all versions; fixed in 3.4.4, 3.5.2
- pyspark (PyPI): affected all versions; fixed in 3.4.4
- pyspark (PyPI): affected all versions; fixed in 3.4.4
- pyspark (PyPI): affected from 3.5.0; fixed in 3.5.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-55039/ (Markdown: https://insights.sbomify.com/CVE-2025-55039/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-55039
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-55039
- OSV: https://osv.dev/vulnerability/CVE-2025-55039

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-55039/
Summaries are generated and may contain mistakes; the official description above is the record.
