CVE-2024-7318
mediumpriority · track · 19EPSS 0.004 · 33 %ileDEEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (9)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2024-2083Red Hat OpenShift Keycloak: Mehrere SchwachstellenDeutsch2024-09-09csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in Red Hat OpenShift ausnutzen, um falsche Informationen darzustellen um die Authentifizierung zu umgehen.
- GHSA-xmmm-jw76-q7vgKeycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity2024-10-14ghsa · osvUS
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.
- BIT-keycloak-2024-7318Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity2026-08-25vendor · osvUS
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.
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (16)
External citations — patches, advisories, analysis.
- https://access.redhat.com/errata/RHSA-2024:6502cnnvd
- https://access.redhat.com/errata/RHSA-2024:6503cnnvd
- https://access.redhat.com/security/cve/CVE-2024-7318cnnvd
- https://access.redhat.com/security/cve/cve-2024-7318cnnvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2301876cnnvd
- https://cxsecurity.com/cveshow/CVE-2024-7318/cnnvd
- https://vigilance.fr/vulnerability/Keycloak-user-access-via-OTP-TimeSeverity-Expiration-45378cnnvd
- https://www.keycloak.org/Patchcnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan