Vulnerability · Published Sep 9, 2024 · Assigned by redhat

CVE-2024-7318Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity

Medium 4.8

In plain English

A medium-severity security flaw in keycloak-core. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 34% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.8Medium
Exploit odds (30 days)0.4%top 66.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Mavenorg.keycloak:keycloak-core24.0.7GHSA-xmmm-jw76-q7vg
Mavenorg.keycloak:keycloak-core25.0.4GHSA-xmmm-jw76-q7vg

Affected products (as reported)

VendorProductVersions
keycloak-core 0 – before 24.0.725.0.0 – before 25.0.4
Red Hat Red Hat Build of Keycloak see references
Red Hat Red Hat build of Keycloak 24 see references
Red Hat Red Hat build of Keycloak 24 see references
Red Hat Red Hat build of Keycloak 24 see references

Weakness: CWE-324 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

References