Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity (keycloak-core)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.39 % · percentile 34 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- redhat
- NVD status
- Analyzed
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.
Weaknesses (CWE)
- CWE-324 — Use of a Key Past its Expiration Date
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N | redhat |
| CVSS 3.1 | MEDIUM 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N | NVD · secalert@redhat.com (Secondary) |
| CVSS 3.1 | MEDIUM 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-xmmm-jw76-q7vg — Keycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity
European references
- ENISA EUVD · EUVD-2024-3171
- GCVE · GCVE-0-2024-7318
Affected configurations (NVD CPE)
cpe:2.3:a:redhat:build_of_keycloak:*:*:*:*:*:*:*:*≥ 22.0 < 24.0.7
Affected products
| Product | Versions |
|---|---|
| keycloak-core | affected 0 < 24.0.7 ; affected 25.0.0 < 25.0.4 |
| Red Hat · Red Hat Build of Keycloak | |
| 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 < * |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |