{"id":"CVE-2026-118030","kind":"vulnerability","aliases":["CVE-2026-118030"],"related":[],"title":"Keycloak: HOTP race lets one one-time code log in twice","description":"A flaw was found in the HOTP authentication mechanism of the keycloak-services component, which provides identity and access management services. The issue occurs because the system validates a one-time password and updates its internal counter in two separate steps without proper locking. An attacker with a users password could exploit this timing gap to use a single one-time code to log in multiple times simultaneously.","summary":"Keycloak's HOTP check validates a one-time password and updates its counter in two separate steps without locking. An attacker who already has a user's password can reuse one one-time code to log in several times at once.","severity":"medium","cvss":4.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["keycloak","runtime","self-hosted","sso"],"not_affected_if":["hotp-disabled","managed-hosting"],"how_to_check":"- Confirm whether the deployment runs Keycloak and which version, for example with `kc.sh --version` or the image tag.\n- Check whether HOTP is enabled as a required or optional second factor in the realm's authentication settings.","fix":null,"status":"open","published_at":"2026-10-29T07:16:44+00:00","first_seen_at":"2026-10-29T07:23:29+00:00","triaged_at":"2026-10-29T07:23:51+00:00","updated_at":"2026-10-29T07:23:51+00:00","category":"runtime","confidence":0.6,"triage":{"at":"2026-10-29T07:23:51Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"network","title":"Keycloak: HOTP race lets one one-time code log in twice","impact":"medium","summary":"Keycloak's HOTP check validates a one-time password and updates its counter in two separate steps without locking. An attacker who already has a user's password can reuse one one-time code to log in several times at once.","audience":"businesses","category":"runtime","nicknames":[],"who_cares":["keycloak","self-hosted","sso"],"confidence":0.6,"fix_status":"unknown","needs_auth":"yes","worst_case":"attacker logs into accounts with stolen password and reused code","analyst_note":"Confirm affected Keycloak version range and whether a fixed release exists; only the NVD entry was provided.","how_to_check":"- Confirm whether the deployment runs Keycloak and which version, for example with `kc.sh --version` or the image tag.\n- Check whether HOTP is enabled as a required or optional second factor in the realm's authentication settings.","plain_action":"","needs_analyst":true,"not_affected_if":["hotp-disabled","managed-hosting"],"who_is_affected":"Organizations running Keycloak as their identity provider with HOTP enabled as a second factor. The attacker needs the user's password, so the second factor is the only thing the race bypasses. Deployments that do not use HOTP are not affected by this description.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000667,"input_tokens":4136,"output_tokens":506,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-118030':15A,18A '-2026':14A,17A 'access':85C 'alreadi':48B 'attack':46B,113C 'authent':73C 'check':28B 'code':9A,60B,130C 'compon':80C 'could':118C 'counter':38B,104C 'cve':13A,16A 'exploit':119C 'flaw':67C 'found':69C 'gap':122C 'host':23B 'hotp':2A,27B,72C 'ident':83C 'intern':103C 'issu':89C 'keycloak':1A,19B,25B,78C 'keycloak-servic':77C 'let':4A 'lock':44B,111C 'log':10A,62B,132C 'manag':86C 'mechan':74C 'multipl':134C 'occur':90C 'one':5A,7A,32B,56B,58B,97C,128C 'one-tim':6A,31B,57B,96C,127C 'password':34B,53B,99C,117C 'proper':110C 'provid':82C 'race':3A 'reus':55B 'runtim':20B 'self':22B 'self-host':21B 'separ':41B,107C 'servic':79C,87C 'sever':64B 'simultan':136C 'singl':126C 'sso':24B 'step':42B,108C 'system':93C 'time':8A,33B,59B,65B,98C,121C,129C,135C 'twice':12A 'two':40B,106C 'updat':36B,101C 'use':124C 'user':51B,116C 'valid':29B,94C 'without':43B,109C","nicknames":[],"mitigations":[],"who_affected":"Organizations running Keycloak as their identity provider with HOTP enabled as a second factor. The attacker needs the user's password, so the second factor is the only thing the race bypasses. Deployments that do not use HOTP are not affected by this description.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"first_public_at":"2026-10-29T07:16:44+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","cvss_by":"secalert@redhat.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118030","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118030","severity":null,"published_at":"2026-10-29T07:16:44+00:00","modified_at":"2026-10-29T07:16:45+00:00","first_seen_at":"2026-10-29T07:23:29+00:00","fetched_at":"2026-10-29T07:23:29+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}