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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.keycloak:keycloak-core | 24.0.7 | GHSA-xmmm-jw76-q7vg |
| Maven | org.keycloak:keycloak-core | 25.0.4 | GHSA-xmmm-jw76-q7vg |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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
- RHSA-2024:6502 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:6503 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-7318 vdb-entry, x_refsource_REDHAT
- RHBZ#2301876 issue-tracking, x_refsource_REDHAT