{"schemaVersion":3,"id":"CVE-2024-7318","aliases":["CGA-4gcr-r67j-3wxf","CGA-7jmq-7w79-m6j7","CGA-8m5j-5qcw-2f2w","CGA-jqff-33pg-qhwg","CGA-m2qr-wwwj-h5px","CGA-p4hh-2gwv-8vm8","GHSA-xmmm-jw76-q7vg","BIT-keycloak-2024-7318"],"status":"published","duplicateOf":null,"title":null,"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.\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.","dates":{"published":"2024-09-09T18:50:36.583Z","modified":"2026-01-26T15:11:07.763Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4.8,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":5.6,"impact":4.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":5.6,"impact":4.2,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Maven","score":6.3,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Maven","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":5.6,"impact":4.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00393,"percentile":0.31919,"severity":"low","asOf":"2026-10-18T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-18T00:00:00.000Z","baselineScore":0.00393},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00393,"percentile":0.31919}],"last30":[{"date":"2026-09-18T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00393,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00393,"percentile":0.31919}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-324","name":"Use of a Key Past its Expiration Date","description":"The product uses a cryptographic key or password past its expiration date, which diminishes its safety significantly by increasing the timing window for cracking attacks against that key.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Low","url":"https://cwe.mitre.org/data/definitions/324.html"}],"affected":[{"vendor":"chainguard","product":"keycloak-config-cli","name":"keycloak-config-cli","label":"keycloak-config-cli","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/keycloak-config-cli","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"chainguard","product":"keycloak-config-cli-compat","name":"keycloak-config-cli-compat","label":"keycloak-config-cli-compat","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/keycloak-config-cli-compat","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"chainguard","product":"keycloak-config-cli-iamguarded-compat","name":"keycloak-config-cli-iamguarded-compat","label":"keycloak-config-cli-iamguarded-compat","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/keycloak-config-cli-iamguarded-compat","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"wolfi","product":"keycloak-config-cli","name":"keycloak-config-cli","label":"keycloak-config-cli","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/keycloak-config-cli","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"wolfi","product":"keycloak-config-cli-compat","name":"keycloak-config-cli-compat","label":"keycloak-config-cli-compat","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/keycloak-config-cli-compat","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"wolfi","product":"keycloak-config-cli-iamguarded-compat","name":"keycloak-config-cli-iamguarded-compat","label":"keycloak-config-cli-iamguarded-compat","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/keycloak-config-cli-iamguarded-compat","purlType":"apk","versions":[{"text":"< 6.4.0-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.4.0-r1","eol":null,"hubHref":null},{"vendor":"org.keycloak","product":"keycloak-core","name":"org.keycloak:keycloak-core","label":"keycloak-core","ecosystem":"Maven","cpePart":null,"purl":"pkg:maven/org.keycloak/keycloak-core","purlType":"maven","versions":[{"text":"< 24.0.7","noFixRecorded":false,"fixedIn":null},{"text":"≥ 25.0.0, < 25.0.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 24.0.7 | ≥ 25.0.0, < 25.0.4","eol":null,"hubHref":null},{"vendor":"redhat","product":"build_of_keycloak","name":"build of keycloak","label":"build_of_keycloak","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 22.0, < 24.0.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 22.0, < 24.0.7","eol":null,"hubHref":"/vendor/redhat/build_of_keycloak"}],"affectedCount":8,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://access.redhat.com/errata/RHSA-2024:6502","label":"access.redhat.com/errata/RHSA-2024:6502","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Advisory","WEB","Issue Tracking"]},{"url":"https://access.redhat.com/errata/RHSA-2024:6503","label":"access.redhat.com/errata/RHSA-2024:6503","hostname":"access.redhat.com","tags":["Vendor Advisory","X Refsource REDHAT","Advisory","WEB","Issue Tracking"]},{"url":"https://access.redhat.com/security/cve/CVE-2024-7318","label":"access.redhat.com/security/cve/CVE-2024-7318","hostname":"access.redhat.com","tags":["VDB Entry","X Refsource REDHAT","Advisory","WEB","Vendor Advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2301876","label":"bugzilla.redhat.com/show_bug.cgi?id=2301876","hostname":"bugzilla.redhat.com","tags":["Issue Tracking","X Refsource REDHAT","REPORT","WEB","Vendor Advisory"]},{"url":"https://access.redhat.com/downloads/content/package-browser/","label":"access.redhat.com/downloads/content/package-browser/","hostname":"access.redhat.com","tags":["WEB"]},{"url":"https://catalog.redhat.com/software/containers/","label":"catalog.redhat.com/software/containers/","hostname":"catalog.redhat.com","tags":["WEB"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/7xxx/CVE-2024-7318.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2024/7xxx/CVE-2024-7318.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7318","label":"nvd.nist.gov/vuln/detail/CVE-2024-7318","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/keycloak/keycloak","label":"github.com/keycloak/keycloak","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/keycloak/keycloak/security/advisories/GHSA-xmmm-jw76-q7vg","label":"github.com/keycloak/keycloak/security/advisories/GHSA-xmmm-jw76-q7vg","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-G934-3XGG-H5Q9","CGA-V922-2HC3-6HGJ"]},"timeline":[{"kind":"published","date":"2024-09-09T18:50:36.583Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-01-26T15:11:07.763Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":19,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T10:18:50.433Z","stale":false,"partial":false}}