Vulnerabilities in pkg:maven/org.apache.spark/spark-core
PACKAGECVE-2021-38296 is a HIGH (CVSS 7.5) authentication bypass vulnerability (CWE-294: Authentication Bypass by Capture-replay) affecting Spark core libraries in the Maven ecosystem. The issue involves authentication bypass by capture-replay in apache spark. Remediation is available by upgrading affected packages to version 3.1.3.
pkg:maven/org.apache.spark/spark-core
Vulnerability advisories affecting package pkg:maven/org.apache.spark/spark-core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9rr6-jpg7-9jg6 | CVE-2021-38296 | HIGH | Authentication Bypass by Capture-replay in Apache Spark |
CVE-2021-38296 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2021-38296
To remediate this vulnerability, upgrade all affected Spark core 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</artifactId>
<version>3.1.3</version>
</dependency>
pip install pyspark>=3.1.3
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-2021-38296, 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 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.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-294: Authentication Bypass by Capture-replay, where a capture-replay flaw exists when the design of the product makes it possible for a malicious user to sniff network traffic and bypass authentication by replaying it to the server in question to the same effect as the original message (or with minor changes). In Spark core, 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-2021-38296 Affected Spark core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.spark:spark-core
|
Maven |
< 3.1.3
|
3.1.3
|
|
pyspark
|
PyPI |
< 3.1.3
|
3.1.3
|
References
Frequently Asked Questions
What is CVE-2021-38296?
Which Spark core versions are affected?
What version fixes CVE-2021-38296?
Is spark-core affected?
Is pyspark affected?
What is the CVSS score of CVE-2021-38296?
What CWE is associated with CVE-2021-38296?
How can I check Maven dependencies for CVE-2021-38296?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9rr6-jpg7-9jg6",
"modified" : "2024-10-25T20:49:39Z",
"published" : "2022-03-11T00:02:36Z",
"aliases" : [ "CVE-2021-38296" ],
"summary" : "Authentication Bypass by Capture-replay in Apache Spark",
"details" : "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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyspark"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-38296"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-9rr6-jpg7-9jg6"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyspark/PYSEC-2022-186.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/70x8fw2gx3g9ty7yk0f2f1dlpqml2smd"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-294" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-11T20:30:09Z",
"nvd_published_at" : "2022-03-10T09:15:00Z"
}
}