{"cve":"CVE-2024-7318","nvd":{"published":"2024-09-09T19:15:14.237","modified":"2026-06-17T08:19:50.710","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.\r\nA 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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8},"cwes":["CWE-324"],"references":["https://access.redhat.com/errata/RHSA-2024:6502","https://access.redhat.com/errata/RHSA-2024:6503","https://access.redhat.com/security/cve/CVE-2024-7318","https://bugzilla.redhat.com/show_bug.cgi?id=2301876"],"products":["redhat:build_of_keycloak"],"source":"nvd","synced_at":"2026-10-19T21:54:38.012257375+00:00"},"epss":{"cve":"CVE-2024-7318","score":0.00393,"percentile":0.3352,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-xmmm-jw76-q7vg","url":"https://osv.dev/vulnerability/GHSA-xmmm-jw76-q7vg","summary":"Keycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity","modified":"2026-09-10T03:50:20.224004205Z","packages":[{"ecosystem":"Maven","name":"org.keycloak:keycloak-core","purl":"pkg:maven/org.keycloak/keycloak-core","ranges":["<24.0.7"],"fixed":["24.0.7"]},{"ecosystem":"Maven","name":"org.keycloak:keycloak-core","purl":"pkg:maven/org.keycloak/keycloak-core","ranges":[">=25.0.0 <25.0.4"],"fixed":["25.0.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}