Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-110008 Overview
CVE-2026-110008 is a login Cross-Site Request Forgery (CSRF) vulnerability in @fastify/oauth2, a Fastify wrapper for OAuth2 login flows. The flaw affects versions 7.2.0 through 8.3.1. The library sets the state and code-verifier cookies without an explicit Path attribute when the login route uses two or more path segments. The OAuth callback then clears those cookies using the root path, so the originals persist across the browser session. An attacker who obtains a state value can reuse it to sign a victim into an attacker-controlled account.
Critical Impact
The single-use guarantee of the OAuth state parameter is broken, enabling login CSRF against users of applications built on affected @fastify/oauth2 versions.
Affected Products
- @fastify/oauth2 version 7.2.0 through 8.3.1
- Fastify applications using multi-segment OAuth2 login routes
- Applications relying on default cookie Path behavior in @fastify/oauth2
Discovery Timeline
- 2026-10-19 - CVE-2026-110008 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110008
Vulnerability Analysis
The vulnerability is a Cross-Site Request Forgery issue classified under [CWE-352]. OAuth2 flows rely on a state value to bind an authorization request to the user agent that initiated it. The library stores this value, along with the PKCE code-verifier, in cookies set at the login route. When the login route has two or more path segments, the cookies inherit the directory-scoped default path rather than the root path.
At the callback, the library attempts to clear these cookies using Path=/. Because the browser treats cookies with different Path attributes as distinct, the clear operation does not remove the original cookies. The state value therefore survives the callback and remains valid for the rest of the browser session.
Root Cause
The root cause is a cookie namespace mismatch between the Set-Cookie operation at login and the clearing operation at the callback. The library does not pass an explicit Path attribute when setting the cookies, so the browser defaults the path to the login route's directory. The clearing step hardcodes Path=/, which targets a different cookie entry in the browser's cookie jar.
Attack Vector
An attacker initiates their own OAuth2 authorization flow and captures the issued state value. The attacker then tricks the victim's browser into completing the callback using that same state. Because the original cookies survive the failed clear operation, the server accepts the replayed state as valid. The victim's session is then bound to the attacker's identity provider account, giving the attacker a persistent authenticated channel into the victim's browser session.
Exploitation requires user interaction and specific application routing conditions, which raises attack complexity. Technical details are documented in the GitHub Security Advisory GHSA-7fcr-mwg4-pw9q.
Detection Methods for CVE-2026-110008
Indicators of Compromise
- Reuse of the same OAuth2 state value across multiple callback requests from the same browser session
- User accounts suddenly linked to unexpected or external identity provider identities
- Set-Cookie headers on the login route for state and code-verifier without an explicit Path attribute
- Successful OAuth callbacks where the issued state was generated more than one authorization cycle earlier
Detection Strategies
- Audit application dependencies for @fastify/oauth2 versions between 7.2.0 and 8.3.1 inclusive
- Inspect HTTP responses from login routes and verify that state and code-verifier cookies carry an explicit Path attribute
- Log and correlate OAuth state issuance and consumption events to identify replay patterns
- Review login routes for path structures containing two or more segments that interact with @fastify/oauth2
Monitoring Recommendations
- Track OAuth callback traffic for anomalous bindings between session cookies and identity provider subject claims
- Alert on repeated use of the same state nonce within a single browser session
- Monitor identity provider logs for authorization flows that complete against unexpected client-side user agents
- Capture Software Bill of Materials (SBOM) data from CI/CD to flag introductions of vulnerable @fastify/oauth2 ranges
How to Mitigate CVE-2026-110008
Immediate Actions Required
- Upgrade @fastify/oauth2 to version 8.3.2 or later across all affected services
- Invalidate active sessions created during the exposure window to force re-authentication
- Review account linkage records for suspicious OAuth identity bindings
- Audit login routes to confirm cookie Path attributes align between set and clear operations
Patch Information
The maintainers fixed the issue in @fastify/oauth2 8.3.2. Users running any version from 7.2.0 through 8.3.1 should upgrade to 8.3.2 or later. Full remediation details are published in the GitHub Security Advisory GHSA-7fcr-mwg4-pw9q and the OpenJSF Security Advisories.
Workarounds
- Configure an explicit cookie Path in the @fastify/oauth2 options so the set and clear operations target the same cookie
- Restrict login routes to a single path segment until the upgrade is deployed
- Shorten OAuth state validity windows at the application layer to reduce replay opportunity
- Enforce strict session rotation after successful OAuth callbacks
# Example: pin a safe version in package.json
npm install @fastify/oauth2@^8.3.2
# Verify the installed version
npm ls @fastify/oauth2
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

