CVE-2024-23945: Apache Hive and Spark CookieSigner Exposes The Correct Signature Vulnerability
HIGHCVE-2024-23945 is a HIGH (CVSS 5.9) cookiesigner exposes the correct signature vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Apache Hive and Spark libraries in the Maven ecosystem. The issue involves cookiesigner exposes the correct signature when message verification fails. Remediation is available by upgrading affected packages to version 4.0.0, 3.4.2.
CVE-2024-23945 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2024-23945
To remediate this vulnerability, upgrade all affected Apache Hive and Spark 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.hive</groupId>
<artifactId>hive-service</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive-thriftserver_2.11</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive-thriftserver_2.12</artifactId>
<version>3.4.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.hive
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-23945, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.hive
Analyze the terminal output to locate any version of Apache Hive and Spark in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.hive 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-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Apache Hive and Spark, 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-2024-23945 Affected Apache Hive and Spark Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.hive:hive-service
|
Maven |
≥ 1.2.0
< 4.0.0
|
4.0.0
|
|
org.apache.spark:spark-hive-thriftserver_2.11
|
Maven |
≤ 2.4.8
|
|
|
org.apache.spark:spark-hive-thriftserver_2.12
|
Maven |
< 3.4.2
|
3.4.2
|
References
Frequently Asked Questions
What is CVE-2024-23945?
Which Apache Hive and Spark versions are affected?
What version fixes CVE-2024-23945?
Is hive-service affected?
Is spark-hive-thriftserver_2.11 affected?
What is the CVSS score of CVE-2024-23945?
What CWE is associated with CVE-2024-23945?
How can I check Maven dependencies for CVE-2024-23945?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-77pm-w3hx-f8mj",
"modified" : "2024-12-26T20:09:20Z",
"published" : "2024-12-23T18:30:47Z",
"aliases" : [ "CVE-2024-23945" ],
"summary" : "Apache Hive and Spark: CookieSigner exposes the correct signature when message verification fails",
"details" : "Signing cookies is an application security feature that adds a digital signature to cookie data to verify its authenticity and integrity. The signature helps prevent malicious actors from modifying the cookie value, which can lead to security vulnerabilities and exploitation. Apache Hive’s service component accidentally exposes the signed cookie to the end user when there is a mismatch in signature between the current and expected cookie. Exposing the correct cookie signature can lead to further exploitation.\n\nThe vulnerable CookieSigner logic was introduced in Apache Hive by HIVE-9710 (1.2.0) and in Apache Spark by SPARK-14987 (2.0.0). The affected components are the following:\n* org.apache.hive:hive-service\n* org.apache.spark:spark-hive-thriftserver_2.11\n* org.apache.spark:spark-hive-thriftserver_2.12",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/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.hive:hive-service"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0"
}, {
"fixed" : "4.0.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-hive-thriftserver_2.11"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.4.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.spark:spark-hive-thriftserver_2.12"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23945"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hive/commit/7638cb1a3b07713cc490aa2909a37037f89e08b4"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark/commit/cf59b1f51c16301f689b4e0f17ba4dbd140e1b19"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/hive"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/spark"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/HIVE-9710"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/SPARK-14987"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/59r4mv7glrxpwkkdjvjbdljfpx3f5zzc"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/5o2ljnzrv8zvhjw9vy7b4rwjpc32hgfc"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/12/23/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-209" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-23T21:14:54Z",
"nvd_published_at" : "2024-12-23T16:15:05Z"
}
}