# CVE-2024-23945: Apache Hive, Apache Spark, Apache Spark: CookieSigner exposes the correct signature when message verification fails

> Apache Hive and Spark expose valid cookie signatures upon verification failure, allowing attackers to bypass integrity checks and potentially forge cookies.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Dec 2024
- **Updated:** 19 Mar 2025
- **Also known as:** CLEANSTART-2026-TG12161, GHSA-77pm-w3hx-f8mj, OESA-2025-1039

## What is CVE-2024-23945?

CVE-2024-23945 is a medium-severity vulnerability in Apache Hive, published on 23 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

The 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:
* org.apache.hive:hive-service
* org.apache.spark:spark-hive-thriftserver_2.11
* org.apache.spark:spark-hive-thriftserver_2.12

Weakness: CWE-209 (Generation of Error Message Containing Sensitive Information)

## Which versions are affected by CVE-2024-23945?

6 open source packages ship an affected version, including org.apache.hive:hive-service, org.apache.spark:spark-hive-thriftserver_2.11 and org.apache.spark:spark-hive-thriftserver_2.12. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.hive:hive-service` | Maven | From 1.2.0 | 4.0.0 |
| `org.apache.hive:hive-service` | Maven | From 1.2.0 | 4.0.0 |
| `org.apache.spark:spark-hive-thriftserver_2.11` | Maven | All versions to 2.4.8 | None |
| `org.apache.spark:spark-hive-thriftserver_2.11` | Maven | All versions to 2.4.8 | None |
| `org.apache.spark:spark-hive-thriftserver_2.12` | Maven | All versions | 3.4.2 |
| `org.apache.spark:spark-hive-thriftserver_2.12` | Maven | All versions | 3.4.2 |

Products: Apache Hive, Apache Spark.

## How do I fix CVE-2024-23945?

Upgrade org.apache.hive:hive-service to 4.0.0 or later.

## Is CVE-2024-23945 being exploited?

There is no known exploitation of CVE-2024-23945 in the wild and no public exploit code.

## Other vulnerabilities in Apache Hive

- [CVE-2026-49845](https://insights.sbomify.com/CVE-2026-49845/): Apache Hive: SQL Injection vulnerability in HiveMetaStore partition-name direct-SQL paths (critical 9.8)
- [CVE-2018-21234](https://insights.sbomify.com/CVE-2018-21234/): Deserialization of Untrusted Data in Jodd (critical 9.8)
- [CVE-2026-55976](https://insights.sbomify.com/CVE-2026-55976/): Apache Hive: SSRF vulnerability in Hive Avro Serde due to Insufficient input validation on avro.schema.url (critical 9.1)
- [CVE-2018-1282](https://insights.sbomify.com/CVE-2018-1282/): SQL Injection in hive-jdbc (critical 9.1)
- [CVE-2022-41137](https://insights.sbomify.com/CVE-2022-41137/): Apache Hive: Deserialization of untrusted data when fetching partitions from the Metastore (high 8.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-23945 and fix it if it is affected.

What it is: CVE-2024-23945 is a medium-severity vulnerability in Apache Hive, published on 23 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-23945 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.hive:hive-service (Maven): affected from 1.2.0; fixed in 4.0.0
- org.apache.hive:hive-service (Maven): affected from 1.2.0; fixed in 4.0.0
- org.apache.spark:spark-hive-thriftserver_2.11 (Maven): affected all versions up to 2.4.8; no fix listed
- org.apache.spark:spark-hive-thriftserver_2.11 (Maven): affected all versions up to 2.4.8; no fix listed
- org.apache.spark:spark-hive-thriftserver_2.12 (Maven): affected all versions; fixed in 3.4.2
- org.apache.spark:spark-hive-thriftserver_2.12 (Maven): affected all versions; fixed in 3.4.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-23945/ (Markdown: https://insights.sbomify.com/CVE-2024-23945/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-23945
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-23945
- OSV: https://osv.dev/vulnerability/CVE-2024-23945

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-23945/
Summaries are generated and may contain mistakes; the official description above is the record.
