Login CSRF in @fastify/oauth2 because OAuth state cookies persist
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Tampering, Security bypass
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-352 and CWE-613.
Summary
@fastify/oauth2 from 7.2.0 before 8.3.2 sets its state and code verifier cookies without a Path attribute on login routes with two or more path segments, but clears them at the callback with a root path, so the original cookies survive (CWE-352). An attacker who learns a state value can reuse it for the rest of the browser session and sign a victim into the attacker's account when the victim takes part in the flow (login CSRF).
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
Description from the CNA
@fastify/oauth2 is a Fastify wrapper for OAuth2 login flows. In versions 7.2.0 through 8.3.1, the state and code-verifier cookies are set without a Path attribute at a login route with two or more path segments, while the clearing step at the OAuth callback writes them with a root path, so the original cookies survive the callback and the documented single-use guarantee for the state value does not hold. A state value an attacker learns stays valid for the rest of the browser session, letting the attacker drive their own authorization flow in the victim's browser and sign the victim in to the attacker's account (login CSRF). The issue is fixed in @fastify/oauth2 8.3.2, and users should upgrade to 8.3.2 or later. As a workaround, set an explicit cookie path so the set and the clear name the same cookie.
Why it matters now
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| @fastify/oauth2 | @fastify/oauth2 | 7.2.0 to before 8.3.2 | 8.3.2 | Patch available | CNA |
- @fastify/oauth2 Vendor@fastify/oauth2 Affected 7.2.0 to before 8.3.2 Fixed in 8.3.2 Patch available CNA
Remediation
Upgrade @fastify/oauth2 to version 8.3.2 or later. As a workaround, set an explicit cookie path so the set and clear operations name the same cookie. The sources list no fixed version for Red Hat OpenShift Dev Spaces.
Written with Claude Haiku 5.5 from the sources below · 2026-11-03
- Fix · CNA @fastify/oauth2 (@fastify/oauth2) Fixed in 8.3.2
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-19 Threatist record created from CVE-2026-110008
- 2026-11-03 Affected versions changed · Red Hat
- 2026-11-03 CVSS score added · Red Hat
References
Sources
- CVE-2026-110008 · CVE Program
- CVE-2026-110008 · NVD
- FIRST EPSS
- CVE-2026-110008 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences