Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker starts OAuth2 flow, captures state
-
DeliveryCraft malicious authorization link
-
ExploitVictim clicks and completes flow
-
ExecutionStale state cookie survives callback
-
ImpactVictim signed into attacker account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a specific deployment: the application must register its OAuth2 login route with two or more path segments, which causes the state and code-verifier cookies to be set without a Path attribute while the callback clears them at the root path, leaving the original cookies alive after the callback. The attacker must also obtain a valid state value and the victim must actively interact by completing the attacker-initiated authorization flow (UI:R). Limiting factors: single-segment login routes are not affected, the documented workaround of setting an explicit matching cookie Path neutralizes the issue, and only @fastify/oauth2 versions 7.2.0 through 8.3.1 are vulnerable (fixed in 8.3.2). |
| Impact | All signals point to a genuinely low-priority issue rather than an urgent one. The provided CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N, base 4.2 / Medium) tells a coherent story: network-reachable but requiring high attack complexity, victim user interaction, and yielding only low confidentiality/integrity impact with no availability effect - consistent with the CWE-352 (CSRF) classification and the login-CSRF mechanism in the description. No EPSS score, SSVC decision, KEV listing, or POC indicator was supplied, so exploitation probability cannot be quantified from the data; there is no public exploit identified at time of analysis and no evidence of active exploitation. The AC:H is well justified because the attacker must both obtain a valid state value and the victim's deployment must use a login route with two or more path segments for the cookie-path mismatch to occur - a real but non-trivial precondition. PR:N is accurate (the attacker is an unauthenticated third party driving their own authorization flow). This is a 'real but minor' bug: a legitimate single-use-state bypass worth patching on a normal maintenance cycle, not a high-urgency flaw. |
| Exploit ScenarioDerived | An attacker initiates an OAuth2 login flow and captures a state value, then lures a victim (via a crafted link) into completing that same authorization flow in their browser; because the state/code-verifier cookies set at the multi-segment login route are never cleared by the root-path callback, the stale state remains valid and the victim is silently signed into the attacker's account (login CSRF). No public exploit code is identified at time of analysis, and success depends on the victim interacting with the attacker-supplied flow. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Login CSRF in @fastify/oauth2 7.2.0 through 8.3.1 allows an attacker who has learned a valid OAuth2 state value to complete an authorization flow in a victim's browser and silently sign the victim in to the attacker's account, because state and code-verifier cookies set at login routes with two or more path segments lack a Path attribute and are not cleared by the callback's root-path deletion. The flaw is limited to multi-segment login routes and requires user interaction plus a known state value, is rated CVSS 4.2 with high attack complexity, and is fixed in 8.3.2; no public exploit code or CISA KEV entry was identified at time of analysis.
RemediationAI
Upgrade @fastify/oauth2 to 8.3.2 or later, which corrects the cookie Path mismatch so the state and code-verifier cookies set at multi-segment login routes are properly cleared at the callback; the vendor advisory is at https://github.com/fastify/fastify-oauth2/security/advisories/GHSA-7fcr-mwg4-pw9q. If upgrading immediately is not possible, apply the documented workaround by setting an explicit cookie Path on the login route so the set and the clear operations name the same cookie, which neutralizes the reusable-state condition; note that this requires changing the route configuration and verifying that the chosen path matches the callback deletion path. Because exploitation requires a known state value and victim interaction, reviewing OAuth login flows for multi-segment paths and ensuring state values are single-use are useful compensating checks, but neither replaces the patched release.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
@fastify/oauth2 is a Fastify plugin that implements OAuth2 authorization-code flows, using a state parameter and, when PKCE is used, a code_verifier stored in browser cookies to bind the authorization request to the callback. Cookie scoping is governed by the Path attribute: a cookie set by a login route such as /auth/login/provider without an explicit Path defaults to the request directory, while the callback handler clears the cookie with a root path, so the set and clear operations target different cookies and the original survives. This is a CWE-352 cross-site request forgery precondition: the state value stays valid for the rest of the browser session rather than being single-use, enabling login CSRF. The CPE data identifies the @fastify/oauth2 package as the affected component, and only deployments that register the login route with two or more path segments are exposed.
Know when Fastify Oauth2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
Remote unauthenticated attacker (AV:N/PR:N) but needs a valid state plus a multi-segment-route deployment and victim action (AC:H/UI:R), yielding limited account-integrity/confidentiality impact.
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
Lifecycle Timeline
1DescriptionCVE.org
@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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
EUVD-2026-104327
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB