CVE-2024-7318
Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
- Published
- Updated
- Reserved
- Assigned by
- redhat
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.
Timeline
ID reserved
By redhat
- 40 days later
· 40 days later
Published
- 17 months later
· 17 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVDNVD · Analyzed | 3.1 | Medium4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.39% · top 66% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.8.
Weakness
Affected products
keycloak-core
- affected < 24.0.7
- affected 25.0.0 – < 25.0.4
Red Hat · Red Hat Build of Keycloak
All versions: unaffected
Red Hat · Red Hat build of Keycloak 24
- unaffected 24.0.7-4 – < *
Red Hat · Red Hat build of Keycloak 24
- unaffected 24-16 – < *
Red Hat · Red Hat build of Keycloak 24
- unaffected 24-16 – < *
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.keycloak:keycloak-coreGHSA-xmmm-jw76-q7vg (opens in a new tab)
References (4)
- RHSA-2024:6502 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2024:6503 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-7318 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2301876 (opens in a new tab)issue-trackingx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-xmmm-jw76-q7vg (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2024-7318)Record last updated .