CVE-2024-7318: Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
Vulnerability summary
CVE-2024-7318 is a medium (CVSS 4.8) Use of a Key Past its Expiration Date vulnerability in redhat build_of_keycloak. EPSS estimates a 0.39% chance of exploitation in the next 30 days, higher than 35.6% of scored vulnerabilities.
Not severe (CVSS 4.8, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 2Timeline
- 09-09-2024PublishedVulnerability first disclosed.
- 26-01-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · WolfiEcosystem advisory · calculated4.8MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated4.8MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- OSV · MavenEcosystem advisory · calculated4.8MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- NVDNIST4.8MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS trend
Probability
0.39%
Chance of exploitation in the next 30 days
Percentile
36%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.39% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard4 products
- activemq-artemis-broker-kubernetesAll versions (No fix recorded)
- keycloak-config-cli< 6.4.0-r1
- keycloak-config-cli-compat< 6.4.0-r1
- keycloak-config-cli-iamguarded-compat< 6.4.0-r1
Wolfi3 products
- keycloak-config-cli< 6.4.0-r1
- keycloak-config-cli-compat< 6.4.0-r1
- keycloak-config-cli-iamguarded-compat< 6.4.0-r1
Org.keycloak1 product
- keycloak-core< 24.0.7 | ≥ 25.0.0, < 25.0.4
Redhat1 product
- build_of_keycloak≥ 22.0, < 24.0.7
4 vendors · 9 products
References
10 links- github.com/keycloak/keycloakPACKAGE