Skip to main content

@fastify/oauth2 EUVDEUVD-2026-104327

| CVE-2026-110008 MEDIUM
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-10-19 openjs
4.2
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker starts OAuth2 flow, captures state
  2. Delivery
    Craft malicious authorization link
  3. Exploit
    Victim clicks and completes flow
  4. Execution
    Stale state cookie survives callback
  5. Impact
    Victim 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

@fastify/oauth2 7.2.0 <8.3.2

Affected Packages

euvd fastify_oauth2 fix: 8.3.2

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

Vendor (openjs) PRIMARY 4.2 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
vuln.today AI 4.2 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Oct 19, 2026 - 15:02 EUVD

DescriptionCVE.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

EPSS Score
0.1%
Top 99% exploitable
Prevalence
Medium
popular Fastify OAuth2 plugin, common in Node.js apps but ecosystem-specific
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

21
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +21
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy