CVE-2024-7318
Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
- State
- Published
- Severity
- 4.8 Medium
- Published
- Sep 9, 2024
- Updated
- Jan 26, 2026
- Reserved
- Jul 31, 2024
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 4.8 Medium | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N | redhat |
Weaknesses
- CWE-324 Use of a Key Past its Expiration Date
Affected Products
| Product | Versions |
|---|---|
keycloak-core |
|
Red Hat Build of KeycloakRed Hat | |
Red Hat build of Keycloak 24Red Hat |
|
Red Hat build of Keycloak 24Red Hat |
|
Red Hat build of Keycloak 24Red Hat |
|
References
- RHSA-2024:6502vendor-advisory
- RHSA-2024:6503vendor-advisory
- https://access.redhat.com/security/cve/CVE-2024-7318vdb-entry
- RHBZ#2301876issue-tracking
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.