Skip to content

Insecure Use of HMAC-SHA1 For Session Signing

Moderate
david-leifker published GHSA-fg9x-wvqw-6gmw Nov 14, 2023

Package

docker datahub-frontend (Docker)

Affected versions

< v0.11.1

Patched versions

v0.11.1

Description

Summary

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).

Details

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.

PoC

Using a few hundred thousand dollars worth of compute resources, a motivated actor can brute force all combinations of the 16 byte signing key to generate a SHA1 HMAC for a given session cookie, changing the user to a more privileged one. Attacker needs to either be able to authenticate successfully to obtain their own session cookie or obtain a session cookie from a logged in user through some other means.

Impact

All deployments using the default helm chart configurations for generating the Play secret key used for signing.

Credit

Dor Konis - GE Vernova
Amit Laish - GE Vernova

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L

CVE ID

CVE-2023-47640

Weaknesses

No CWEs

Credits