PatchSiren cyber security CVE debrief
CVE-2026-18165 @fastify/oauth2 CVE debrief
AI-assisted PatchSiren debrief based on the supplied source corpus. The CVE record was published on 2026-08-15T14:17:07.290Z and has not been modified since then. The @fastify/oauth2 plugin for Fastify has a login CSRF vulnerability in versions from 7.2.0 up to but not including 8.3.0. The issue allows an attacker to 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. The vulnerability is due to the plugin validating the OAuth state and 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. This vulnerability affects Fastify/oauth2 users, particularly those who use OAuth 2.0 for authentication. Users should be aware of this vulnerability and take steps to mitigate it by upgrading to version 8.3.0 or later and enabling hostPrefixedCookies.
- Vendor
- @fastify/oauth2
- Product
- Unknown
- CVSS
- MEDIUM 4.2
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-08-15
- Original CVE updated
- 2026-09-04
- Advisory published
- 2026-08-15
- Advisory updated
- 2026-09-04
Who should care
Fastify/oauth2 users, particularly those who use OAuth 2.0 for authentication, should be aware of this vulnerability and take steps to mitigate it. Affected operator, platform, vulnerability-management, and security-team impact should be reviewed. Users should prioritize upgrading to version 8.3.0 or later and enabling hostPrefixedCookies to mitigate login CSRF attacks. Additionally, binding state to a server-side session, monitoring for suspicious OAuth activity, and performing inventory checks for affected versions are recommended.
Technical summary
The @fastify/oauth2 plugin for Fastify has a login CSRF vulnerability in versions from 7.2.0 up to but not including 8.3.0. The issue allows an attacker to 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. The vulnerability is due to the plugin validating the OAuth state and 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.
Defensive priority
Fastify/oauth2 users should prioritize upgrading to version 8.3.0 or later and enabling hostPrefixedCookies to mitigate login CSRF attacks.
Recommended defensive actions
- Upgrade to @fastify/oauth2 version 8.3.0 or later
- Enable hostPrefixedCookies option
- Bind state to a server-side session
- Monitor for suspicious OAuth activity
- Perform inventory checks for affected versions
Evidence notes
The @fastify/oauth2 plugin for Fastify has a login CSRF vulnerability in versions from 7.2.0 up to but not including 8.3.0. The issue allows an attacker to 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. The vulnerability is due to the plugin validating the OAuth state and 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.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-18165 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-18165
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-18165 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-18165
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Source reference
Unverified legacy reference
URL: https://cna.openjsf.org/security-advisories.html
ce714d77-add3-4f53-aff5-83d477b104bb - Vendor Advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/fastify/fastify-oauth2/security/advisories/GHSA-p8h8-rj28-m8q9
ce714d77-add3-4f53-aff5-83d477b104bb - Mitigation, Vendor Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.