Read the docs
TI-2026-14948 Aliases CVE-2026-18165

@fastify/oauth2 vulnerable to Login CSRF via plantable OAuth state cookies

Priority LOW 23CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Tampering
Confidentiality · integrity · availability
Low · Low · None
Fix status
Partial Red Hat: 1 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-352.

Summary

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

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00127 2nd percentileScored 2026-11-07
Fix Partial @fastify/oauth2 (@fastify/oauth2): 8.3.0Red Hat: 1 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
@fastify/oauth2@fastify/oauth27.2.0 to before 8.3.08.3.0Patch availableCNA
  • @fastify/oauth2 Vendor@fastify/oauth2 Affected 7.2.0 to before 8.3.0 Fixed in 8.3.0 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:fastify:fastify\/oauth2:*:*:*:*:*:node.js:*:*7.2.0 to before 8.3.0Vulnerablefastify
  • cpe:2.3:a:fastify:fastify\/oauth2:*:*:*:*:*:node.js:*:* Versions 7.2.0 to before 8.3.0 Vulnerable ·fastify

Remediation

  • Fix · CNA @fastify/oauth2 (@fastify/oauth2) Fixed in 8.3.0

Vendor assessments

Red Hat

Red Hat rating: Low. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat OpenShift Dev SpacesAffectedNo fix yet: Fix deferred

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-18165

References

  • TI-2026-76423 Login CSRF in @fastify/oauth2 because OAuth state cookies persist CVSS 3.1MEDIUM 4.2

Sources