Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl sibling subdomain
-
DeliveryPlant matching state/verifier cookies on shared domain
-
ExploitLure victim through OAuth authorization flow
-
ExecutionCallback validates planted cookies without session binding
-
ImpactVictim browser session silently bound to attacker's 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 the attacker to control a subdomain sharing the same registrable domain as the target application (e.g., attacker controls evil.example.com to target app.example.com), which is the precondition enabling cross-subdomain cookie injection. The victim must be lured through an OAuth 2.0 authorization code flow handled by the affected plugin - either by following a crafted link or being silently redirected. The vulnerability is present in default plugin configurations in versions 7.2.0-8.2.x; the hostPrefixedCookies fix is opt-in and inactive by default even after upgrade to 8.3.0 unless explicitly configured. Exploitation is strictly limited to login CSRF: the victim's own account credentials, OAuth tokens, and account data are not exposed - only the victim's active session becomes bound to the attacker's identity. Deployments where all subdomains under the registrable domain are fully trusted and organizationally controlled are not realistically exploitable. |
| Impact | The CVSS 4.2 score with AC:H and UI:R accurately reflects the substantial preconditions required: the attacker must possess control over a sibling subdomain on the same registrable domain as the target application, and the victim must actively participate in an OAuth authorization flow. These constraints meaningfully suppress real-world risk - opportunistic mass exploitation is not feasible, and the attack is inapplicable to deployments where the application does not share a registrable domain with untrusted or attacker-controllable subdomains. The impact is bounded by design: the vulnerability achieves login CSRF (victim is signed into the attacker's account), but does not expose the victim's own credentials, account data, or session tokens. This is a meaningful integrity and trust violation - particularly for applications where account confusion could lead to privacy leakage through the attacker observing what the victim does while logged in - but it is not a direct credential or data exfiltration path. No EPSS data was provided in the intelligence feed; exploitation probability inferred from CVSS metrics and the subdomain-control prerequisite is low. The CVE is not listed in CISA KEV and no public exploit code is referenced. SSVC assessment suggests defer or scheduled remediation priority for most deployments; accelerate only if the application is deployed alongside untrusted sibling subdomains. |
| Exploit ScenarioDerived | An attacker who controls evil.example.com (while the target OAuth application runs at app.example.com) crafts a page that writes cookie values for state and code_verifier matching an attacker-initiated OAuth flow on the same provider. The victim is lured to visit the attacker's page, cookies are planted, and the victim is then redirected through the OAuth authorization code flow; upon callback, the @fastify/oauth2 plugin validates the planted cookies and completes the flow, binding the victim's browser session to the attacker's provider account. No public proof-of-concept code has been identified; exploitation requires attacker control of a sibling subdomain, which limits this to targeted rather than opportunistic attacks. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 15, 2026
Login CSRF in @fastify/oauth2 versions 7.2.0 through 8.2.x allows an attacker controlling a sibling subdomain to plant predictable OAuth state and PKCE code verifier cookies, silently signing a victim into the attacker's account instead of their own. The root cause is the absence of server-side session binding and cookie prefixing - the plugin validates OAuth state exclusively by comparing callback parameters against unprefixed cookies, which sibling subdomains sharing the same registrable domain can freely overwrite. No active exploitation has been confirmed (not in CISA KEV) and no public proof-of-concept exists; the high attack complexity limits opportunistic risk.
RemediationAI
Upgrade @fastify/oauth2 to version 8.3.0, which introduces the hostPrefixedCookies option; this option must be explicitly enabled in plugin configuration to apply __Host- cookie prefixing, which browsers enforce to prevent sibling subdomains from overwriting cookies. If an immediate upgrade is not feasible, the alternative fix described in the advisory is to bind OAuth state to a server-side session (e.g., express-session or a custom session store) rather than relying solely on cookie comparison - this eliminates the cookie-injection vector entirely but requires additional session infrastructure. As a compensating control where neither option is immediately available, ensure no untrusted parties control any subdomain under the same registrable domain as the application, reducing the attack surface to zero; however, this is a deployment-level constraint rather than a code-level fix and may be difficult to guarantee over time. Advisory reference: https://github.com/fastify/fastify-oauth2/security/advisories/GHSA-p8h8-rj28-m8q9.
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
The affected package @fastify/oauth2 implements the OAuth 2.0 authorization code flow as a plugin for the Fastify Node.js web framework. The vulnerability class is CWE-352 (Cross-Site Request Forgery), applied specifically to the OAuth callback validation step. The plugin stores the anti-CSRF state parameter and PKCE code_verifier in HTTP cookies without applying cookie prefixes (__Host- or __Secure-). Browser cookie scoping rules allow any subdomain under the same registrable domain (e.g., evil.example.com) to set cookies readable by the target application (app.example.com). Since the plugin performs no server-side session binding - it simply compares the callback query parameter to whatever cookie is present - an attacker who controls a sibling subdomain can pre-plant matching state and verifier values, neutering both the standard OAuth state CSRF protection and the PKCE extension that was specifically designed to prevent code injection. The affected CPE corresponds to the @fastify/oauth2 npm package in the 7.2.x-8.2.x version range on Node.js.
Know when Fastify 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:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Sibling-subdomain cookie write access required (AC:H); victim must participate in OAuth flow (UI:R); impact limited to session confusion with no victim credential exposure (C:L, I:L, A:N).
Primary rating from Vendor (ce714d77-add3-4f53-aff5-83d477b104bb).
CVSS VectorNVD
Lifecycle Timeline
2DescriptionNVD
@fastify/oauth2 is an OAuth 2.0 plugin for Fastify. In versions from 7.2.0 up to but not including 8.3.0, the plugin validates the OAuth state, and with PKCE the code verifier, by comparing the callback query parameter against an unprefixed, predictable cookie, with no server-side binding to the browser that began the flow. Any party able to write a cookie for the application's host, such as a sibling subdomain under the same registrable domain, can plant matching state and verifier cookies and complete an attacker-owned OAuth flow inside a victim's browser, silently signing the victim in to the attacker's account (login CSRF). It does not expose the victim's own account, credentials, or tokens. The issue is fixed in @fastify/oauth2 8.3.0, which adds an opt-in hostPrefixedCookies option. Users should upgrade to 8.3.0 and enable it, or bind state to a server-side session.
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.
All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all req
A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect
Fastify is a fast and low overhead web framework, for Node.js. Rated high severity (CVSS 7.5), this vulnerability is rem
Prototype pollution vulnerability in fastify-multipart < 1.0.5 allows an attacker to crash fastify applications parsing
Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: a
A denial of service vulnerability exists in Fastify v2.14.1 and v3.0.0-rc.4 that allows a malicious user to trigger reso
A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit
Authorization bypass in the @fastify/express middleware-compatibility plugin (versions 4.0.6 and earlier) lets unauthent
Authentication bypass in @fastify/express v4.0.4 and earlier allows remote unauthenticated attackers to access protected
Middleware bypass in Fastify Express plugin (fastify/express) allows complete circumvention of authentication, authoriza
Fastify is a web framework with minimal overhead and plugin architecture. Rated high severity (CVSS 8.8), this vulnerabi
Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauth
EUVD-2026-59767
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB