{"id":"CVE-2026-110008","kind":"vulnerability","aliases":["CVE-2026-110008"],"related":[],"title":"@fastify/oauth2: OAuth state cookie reuse enables login CSRF attacks","description":"@fastify/oauth2 is a Fastify wrapper for OAuth2 login flows. In versions 7.2.0 through 8.3.1, the state and code-verifier cookies are set without a Path attribute at a login route with two or more path segments, while the clearing step at the OAuth callback writes them with a root path, so the original cookies survive the callback and the documented single-use guarantee for the state value does not hold. A state value an attacker learns stays valid for the rest of the browser session, letting the attacker drive their own authorization flow in the victim's browser and sign the victim in to the attacker's account (login CSRF). The issue is fixed in @fastify/oauth2 8.3.2, and users should upgrade to 8.3.2 or later. As a workaround, set an explicit cookie path so the set and the clear name the same cookie.","summary":"In @fastify/oauth2 versions 7.2.0 through 8.3.1, the OAuth state and code-verifier cookies are not cleared at the callback when the login route has two or more path segments, so a state value stays reusable. An attacker can use this to sign a victim into the attacker's account (login CSRF).","severity":"medium","cvss":4.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["fastify","node","oauth","package","self-hosted"],"not_affected_if":["no-oauth-login-route","version-8.3.2-or-later"],"how_to_check":"- Check the installed version with `npm ls @fastify/oauth2`\n- Look for OAuth login routes with two or more path segments that call the plugin's cookie-based state handling\n- Confirm whether the plugin is configured with an explicit cookie path","fix":"- Upgrade @fastify/oauth2 to `8.3.2` or later\n- Until upgraded, set an explicit cookie path so the set and clear operations name the same cookie","status":"open","published_at":"2026-10-19T14:16:57+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","triaged_at":"2026-10-25T04:41:42+00:00","updated_at":"2026-10-25T04:41:42+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T04:41:42Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade @fastify/oauth2 to `8.3.2` or later\n- Until upgraded, set an explicit cookie path so the set and clear operations name the same cookie","reach":"internet","title":"@fastify/oauth2: OAuth state cookie reuse enables login CSRF attacks","impact":"low","summary":"In @fastify/oauth2 versions 7.2.0 through 8.3.1, the OAuth state and code-verifier cookies are not cleared at the callback when the login route has two or more path segments, so a state value stays reusable. An attacker can use this to sign a victim into the attacker's account (login CSRF).","category":"package","nicknames":[],"who_cares":["fastify","node","oauth","self-hosted"],"confidence":0.7,"needs_auth":"no","worst_case":"victim is signed into attacker's account via login CSRF","analyst_note":"","how_to_check":"- Check the installed version with `npm ls @fastify/oauth2`\n- Look for OAuth login routes with two or more path segments that call the plugin's cookie-based state handling\n- Confirm whether the plugin is configured with an explicit cookie path","needs_analyst":false,"not_affected_if":["version-8.3.2-or-later","no-oauth-login-route"],"who_is_affected":"Applications that use @fastify/oauth2 between versions 7.2.0 and 8.3.1 for login flows, where the login route has two or more path segments, so the state cookie is set with a different path than it is cleared. Teams not using this plugin, or on 8.3.2 or later, can skip it.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000639,"input_tokens":3481,"output_tokens":582,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-110008':12A,15A '-2026':11A,14A '7.2.0':26B,86C '8.3.1':28B,88C '8.3.2':193C,199C 'account':72B,184C 'attack':9A,60B,70B,151C,164C,182C 'attribut':101C 'author':168C 'browser':160C,174C 'callback':42B,119C,132C 'clear':39B,114C,215C 'code':34B,93C 'code-verifi':33B,92C 'cooki':4A,36B,95C,129C,208C,219C 'csrf':8A,74B,186C 'cve':10A,13A 'document':135C 'drive':165C 'enabl':6A 'explicit':207C 'fastifi':16B,78C 'fastify/oauth2':1A,24B,75C,192C 'fix':190C 'flow':83C,169C 'guarante':139C 'hold':146C 'host':22B 'issu':188C 'later':201C 'learn':152C 'let':162C 'login':7A,45B,73B,82C,104C,185C 'name':216C 'node':17B 'oauth':2A,18B,30B,118C 'oauth2':81C 'origin':128C 'packag':19B 'path':51B,100C,110C,125C,209C 'rest':157C 'reus':5A 'reusabl':58B 'root':124C 'rout':46B,105C 'segment':52B,111C 'self':21B 'self-host':20B 'session':161C 'set':97C,205C,212C 'sign':65B,176C 'singl':137C 'single-us':136C 'state':3A,31B,55B,90C,142C,148C 'stay':57B,153C 'step':115C 'surviv':130C 'two':48B,107C 'upgrad':197C 'use':62B,138C 'user':195C 'valid':154C 'valu':56B,143C,149C 'verifi':35B,94C 'version':25B,85C 'victim':67B,172C,178C 'without':98C 'workaround':204C 'wrapper':79C 'write':120C","nicknames":[],"mitigations":[],"who_affected":"Applications that use @fastify/oauth2 between versions 7.2.0 and 8.3.1 for login flows, where the login route has two or more path segments, so the state cookie is set with a different path than it is cleared. Teams not using this plugin, or on 8.3.2 or later, can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-19T14:16:57+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","cvss_by":"ce714d77-add3-4f53-aff5-83d477b104bb","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-110008","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-110008","severity":null,"published_at":"2026-10-19T14:16:57+00:00","modified_at":"2026-10-19T21:13:39+00:00","first_seen_at":"2026-10-23T21:57:18+00:00","fetched_at":"2026-10-23T22:28:57+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"}