CVE Vulnerabilities

CVE-2024-7318

Use of a Key Past its Expiration Date

Published: Sep 09, 2024 | Modified: Jun 17, 2026
CVSS 3.x
4.8
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
CVSS 2.x
RedHat/V2
RedHat/V3
4.8 LOW
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Ubuntu

A vulnerability was found in Keycloak. Expired OTP codes are still usable when using FreeOTP when the OTP token period is set to 30 seconds (default). Instead of expiring and deemed unusable around 30 seconds in, the tokens are valid for an additional 30 seconds totaling 1 minute. A one time passcode that is valid longer than its expiration time increases the attack window for malicious actors to abuse the system and compromise accounts. Additionally, it increases the attack surface because at any given time, two OTPs are valid.

Weakness

The product uses a cryptographic key or password past its expiration date, which diminishes its safety significantly by increasing the timing window for cracking attacks against that key.

Affected Software

NameVendorStart VersionEnd Version
Build_of_keycloakRedhat22.0 (including)24.0.7 (excluding)
Red Hat Build of KeycloakRedHatkeycloak-core*
Red Hat build of Keycloak 24RedHatrhbk/keycloak-operator-bundle:24.0.7-4*
Red Hat build of Keycloak 24RedHatrhbk/keycloak-rhel9:24-16*
Red Hat build of Keycloak 24RedHatrhbk/keycloak-rhel9-operator:24-16*

Potential Mitigations

References