# CVE-2023-47640: Insecure Use of HMAC-SHA1 For Session Signing in datahub

> Weak HMAC-SHA1 signing allows attackers to brute-force session keys and escalate privileges in DataHub deployments using default configurations.

- **Severity:** Medium 6.4 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 14 Nov 2023
- **Updated:** 7 Jan 2025

## What is CVE-2023-47640?

CVE-2023-47640 is a medium-severity vulnerability in datahub-project datahub, published on 14 Nov 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

DataHub is an open-source metadata platform. The HMAC signature for DataHub Frontend sessions was being signed using a SHA-1 HMAC with the frontend secret key. SHA1 with a 10 byte key can be brute forced using sufficient resources (i.e. state level actors with large computational capabilities). DataHub Frontend was utilizing the Play LegacyCookiesModule with default settings which utilizes a SHA1 HMAC for signing. This is compounded by using a shorter key length than recommended by default for the signing key for the randomized secret value. An authenticated attacker (or attacker who has otherwise obtained a session token) could crack the signing key for DataHub and obtain escalated privileges by generating a privileged session cookie. Due to key length being a part of the risk, deployments should update to the latest helm chart and rotate their session signing secret. All deployments using the default helm chart configurations for generating the Play secret key used for signing are affected by this vulnerability. Version 0.11.1 resolves this vulnerability. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-327 (Use of a Broken or Risky Cryptographic Algorithm)

## Which versions are affected by CVE-2023-47640?

It affects 1 product.


Products: Datahub Project Datahub.

## How do I fix CVE-2023-47640?

No fix has been published for CVE-2023-47640 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-47640 being exploited?

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

## Other vulnerabilities in datahub-project datahub

- [CVE-2024-22409](https://insights.sbomify.com/CVE-2024-22409/): Default Privileges allow for high level operations for low privileged users in datahub (high 7.5)
- [CVE-2023-25558](https://insights.sbomify.com/CVE-2023-25558/): Deserialization of untrusted data in DataHub (high 7.5)
- [CVE-2023-47629](https://insights.sbomify.com/CVE-2023-47629/): Privilege escalation through email sign-up in datahub (high 7.1)
- [CVE-2023-47628](https://insights.sbomify.com/CVE-2023-47628/): Session Expiration Misconfiguration in datahub (medium 4.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-47640 and fix it if it is affected.

What it is: CVE-2023-47640 is a medium-severity vulnerability in datahub-project datahub, published on 14 Nov 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-47640 in the wild and no public exploit code.

Affected product: datahub-project datahub. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2023-47640/ (Markdown: https://insights.sbomify.com/CVE-2023-47640/index.md)
```

## Sources

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

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