SEPTEMBER 8, 2026
Live Feed
Back to database
Case File

CVE-2026-18165

MEDIUM · CVSS 4.2 EPSS 0.10% Public Exploit

Source: NVD + CISA KEV + EPSS · Published 2026-08-15 · Last synced 2026-09-08

CyberRota Analysis

AI-Generated

The @fastify/oauth2 plugin for Fastify versions 7.2.0 to 8.2.9 is vulnerable to a login CSRF attack due to improper validation of OAuth state and PKCE code verifier, allowing attackers to exploit predictable cookies and hijack OAuth flows. This vulnerability can be exploited by any entity capable of writing cookies for the application's host, particularly from sibling subdomains. Organizations using this plugin should prioritize upgrading to version 8.3.0 and enabling the hostPrefixedCookies option or implement server-side session binding to mitigate the risk.

Public Exploit Signal

A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.

GitHub PoC Links

Note: these links are listed for security research and verification purposes only.

CVE
CVE-2026-18165
Severity
MEDIUM
CVSS
4.2
EPSS
0.10%

Original NVD Description

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

Related CVEs

Other vulnerabilities affecting the same vendor(s)