CVE-2023-22946: Spark core 2.12 Apache Spark Vulnerable To Improper Vulnerability
CRITICALCVE-2023-22946 is a CRITICAL (CVSS 9.9) apache spark vulnerable to improper vulnerability (CWE-269: Improper Privilege Management) affecting Spark core 2.12 libraries in the Maven ecosystem. The issue involves apache spark vulnerable to improper privilege management. Remediation is available by upgrading affected packages to version 3.3.3, 3.3.2.
CVE-2023-22946 at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2023-22946
To remediate this vulnerability, upgrade all affected Spark core 2.12 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.12</artifactId>
<version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.13</artifactId>
<version>3.3.3</version>
</dependency>
pip install pyspark>=3.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.spark
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-22946, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.spark
Analyze the terminal output to locate any version of Spark core 2.12 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.spark command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Spark core 2.12, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-22946 Affected Spark core 2.12 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.spark:spark-core_2.12
|
Maven |
< 3.3.3
|
3.3.3
|
|
org.apache.spark:spark-core_2.13
|
Maven |
< 3.3.3
|
3.3.3
|
|
pyspark
|
PyPI |
< 3.3.2
|
3.3.2
|
References
Frequently Asked Questions
What is CVE-2023-22946?
Which Spark core 2.12 versions are affected?
What version fixes CVE-2023-22946?
Is spark-core_2.12 affected?
Is spark-core_2.13 affected?
What is the CVSS score of CVE-2023-22946?
What CWE is associated with CVE-2023-22946?
How can I check Maven dependencies for CVE-2023-22946?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-329j-jfvr-rhr6",
"modified" : "2024-10-15T18:43:45Z",
"published" : "2023-04-17T09:30:23Z",
"aliases" : [ "CVE-2023-22946" ],
"summary" : "Apache Spark vulnerable to Improper Privilege Management",
"details" : "In Apache Spark versions prior to versions 3.4.0 and 3.3.3, 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.\n\nUpdate to Apache Spark 3.4.0, 3.3.3, or later, and ensure that spark.submit.proxyUser.allowCustomClasspathInClusterMode is set to its default of \"false\", and is not overridden by submitted applications.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.12"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.3.2"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core_2.13"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.3.2"
}
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyspark"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22946"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/pull/39474"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/pull/41428"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/commit/909da96e1471886a01a9e1def93630c4fd40e74a"
}, {
"type" : "WEB",
"url" : "https://github.com/degant/spark/commit/bfba57724d2520e0fcaa7990f7257c21d11cd75a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/spark"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2023-44.yaml"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/SPARK-41958"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/yllfl25xh5tbotjmg93zrq4bzwhqc0gv"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-21T20:37:59Z",
"nvd_published_at" : "2023-04-17T08:15:00Z"
}
}