5.4

CVE-2026-18165: fastify fastify\/oauth2 Cross-Site Request Forgery (CSRF)

CVSS: 5.4v3.1MediumAnalyzed
Published 15-08-2026Last modified 17-08-2026

Vulnerability summary

CVE-2026-18165 is a medium (CVSS 5.4) Cross-Site Request Forgery (CSRF) vulnerability in fastify fastify\/oauth2. EPSS estimates a 0.10% chance of exploitation in the next 30 days, higher than 0.8% of scored vulnerabilities.

Overall risk
22/100
0100
Low · default modelHow is this calculated?
CVSS score
5.4/10
010
Medium · v3.1 (NVD)
EPSS score
0.10%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Timeline

  1. 15-08-2026
    PublishedVulnerability first disclosed.
  2. 17-08-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

2 scores · 2 sources · 1 version

EPSS trend

Probability

0.10%

Chance of exploitation in the next 30 days

Percentile

1%

Versus all other CVEs

30-day change

0.00 pp

From 0.10% on 20-09-2026

20-09-202620-10-2026
EPSS score
0.10%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

@fastify/oauth21 product
Fastify1 product

2 vendors · 2 products

References

2 links