CVE-2026-18165
Last modified
CVE-2026-18165 is a medium-severity vulnerability rated 5.4/10 on the CVSS scale. @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. EPSS estimates a 0.10% chance of exploitation in the next 30 days.
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.
Metrics
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Fastify | Fastify\/Oauth2 | >= 7.2.0, < 8.3.0 |
References
- https://cna.openjsf.org/security-advisories.htmlVendor Advisory
- https://github.com/fastify/fastify-oauth2/security/advisories/GHSA-p8h8-rj28-m8q9Mitigation, Vendor Advisory
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-18165?
How severe is CVE-2026-18165?
How do I fix CVE-2026-18165?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-18157A flaw was found in yggdrasil-worker-package-manager. A loca…7.8
- CVE-2026-1816Improper restriction of excessive authentication attempts vu…6.3
- CVE-2026-18161IBM Financial Transaction Manager (FTM) for RedHat OpenShift…4.3
- CVE-2026-18162IBM Financial Transaction Manager (FTM) for RedHat OpenShift…9.8
- CVE-2026-18163IBM Financial Transaction Manager (FTM) for RedHat OpenShift…9.8
- CVE-2026-18164An undocumented hard-coded credential, shared by all device …8.1
- CVE-2026-18167A stack-based buffer overflow vulnerability exists in the Ea…7.7
- CVE-2026-18169IBM Financial Transaction Manager (FTM) for RedHat OpenShift…9.9
- CVE-2026-18170IBM Financial Transaction Manager (FTM) for RedHat OpenShift…6.5
- CVE-2026-18171Docker Sandboxes (sbx) applies the read-only intent of a run…5.7
- CVE-2026-18172IBM Financial Transaction Manager (FTM) for RedHat OpenShift…7.4
- CVE-2026-18173IBM Financial Transaction Manager (FTM) for RedHat OpenShift…3.7
Are you affected by CVE-2026-18165?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
