Read the docs
TI-2023-13481 Aliases CVE-2023-29020GHSA-2ccf-ffrj-m4qw

Cross site request forgery token fixation in fastify-passport

Priority LOW 29CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Tampering, Spoofing
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-352 and CWE-384.

Summary

@fastify/passport is a port of passport authentication library for the Fastify ecosystem. The CSRF (Cross-Site Request Forger) protection enforced by the `@fastify/csrf-protection` library, when combined with `@fastify/passport` in affected versions, can be bypassed by network and same-site attackers. `fastify/csrf-protection` implements the synchronizer token pattern (using plugins `@fastify/session` and `@fastify/secure-session`) by storing a random value used for CSRF token generation in the `_csrf` attribute of a user's session. The `@fastify/passport` library does not clear the session object upon authentication, preserving the `_csrf` attribute between pre-login and authenticated sessions. Consequently, CSRF tokens generated before authentication are still valid. Network and same-site attackers can thus obtain a CSRF token for their pre-session, fixate that pre-session in the victim's browser via cookie tossing, and then perform a CSRF attack after the victim authenticates. As a solution, newer versions of `@fastify/passport` include the configuration options: `clearSessionOnLogin (default: true)` and `clearSessionIgnoreFields (default: ['passport', 'session'])` to clear all the session attributes by default, preserving those explicitly defined in `clearSessionIgnoreFields`.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00384 32nd percentileScored 2026-11-07
Fix Fixed fastify-passport (fastify): 1.1.0, 2.3.0@fastify/passport (npm): 1.1.0, 2.3.0

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

VendorProductAffected versionsFixed inStatusSource
fastifyfastify-passportbefore 1.1.0; 2.0.0 to before 2.3.01.1.0, 2.3.0Patch availableCNA
—@fastify/passport (npm)before 1.1.01.1.0Patch availableGHSA-2ccf-ffrj-m4qw
—@fastify/passport (npm)2.0.0 to before 2.3.02.3.0Patch availableGHSA-2ccf-ffrj-m4qw
  • fastify-passport Vendorfastify Affected before 1.1.0; 2.0.0 to before 2.3.0 Fixed in 1.1.0, 2.3.0 Patch available CNA
  • @fastify/passport (npm) Vendor— Affected before 1.1.0 Fixed in 1.1.0 Patch available GHSA-2ccf-ffrj-m4qw
  • @fastify/passport (npm) Vendor— Affected 2.0.0 to before 2.3.0 Fixed in 2.3.0 Patch available GHSA-2ccf-ffrj-m4qw

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:fastify:passport:*:*:*:*:*:node.js:*:*before 1.1.0; 2.0.0 to before 2.3.0Vulnerablefastify
  • cpe:2.3:a:fastify:passport:*:*:*:*:*:node.js:*:* Versions before 1.1.0; 2.0.0 to before 2.3.0 Vulnerable ·fastify

Remediation

  • Fix · CNA fastify-passport (fastify) Fixed in 1.1.0, 2.3.0
  • Fix · GHSA-2ccf-ffrj-m4qw @fastify/passport (npm) Fixed in 1.1.0 Advisory →
  • Fix · GHSA-2ccf-ffrj-m4qw @fastify/passport (npm) Fixed in 2.3.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-29020
  2. 2026-10-03 Alias added: GHSA-2ccf-ffrj-m4qw

References

  • TI-2023-13480 Session fixation in fastify-passport CVSS 3.1HIGH 8.1

Sources