CVE-2024-7318
published medium CVSS 3.1 · 4.8Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Not stated | — | keycloak-core0 to < 24.0.7 · 25.0.0 to < 25.0.4 · Other versions: unaffected | Affected | Not stated | redhat |
| Red Hat | — | keycloak-coreRed Hat Build of Keycloak | Unaffected | Not required | redhat |
| Red Hat | — | rhbk/keycloak-operator-bundleRed Hat build of Keycloak 24 · 24.0.7-4 and later · Other versions: affected | Unaffected | Not stated | redhat |
| Red Hat | — | rhbk/keycloak-rhel9Red Hat build of Keycloak 24 · 24-16 and later · Other versions: affected | Unaffected | Not stated | redhat |
| Red Hat | — | rhbk/keycloak-rhel9-operatorRed Hat build of Keycloak 24 · 24-16 and later · Other versions: affected | Unaffected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.8 / 10
- Severity
- medium
- Provider
- redhat · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| keycloak-core | 0 to < 24.0.7 (affected · semver)25.0.0 to < 25.0.4 (affected · semver)Default: unaffected | redhat · cna | |
| Red Hat | Red Hat Build of Keycloak | Default: unaffected | redhat · cna |
| Red Hat | Red Hat build of Keycloak 24 | 24.0.7-4 and later (unaffected · rpm)Default: affected | redhat · cna |
| Red Hat | Red Hat build of Keycloak 24 | 24-16 and later (unaffected · rpm)Default: affected | redhat · cna |
| Red Hat | Red Hat build of Keycloak 24 | 24-16 and later (unaffected · rpm)Default: affected | redhat · cna |
Weaknesses
1- CWE-324 Use of a Key Past its Expiration Date
References
4- RHSA-2024:6502 https://access.redhat.com/errata/RHSA-2024:6502
- RHSA-2024:6503 https://access.redhat.com/errata/RHSA-2024:6503
- https://access.redhat.com/security/cve/CVE-2024-7318
- RHBZ#2301876 https://bugzilla.redhat.com/show_bug.cgi?id=2301876
Provider assertions
2redhat · cna
Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 80aa187ff582dd95d8f6e1e6e2e4e93e12f4f4d3eb60fcffeacf15bd87b2cda2
- Ingested
- 23 Sep 2026, 08:33:35 UTC
- Source record
- Official CVE record