Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NSummary
CVE-2023-29020 is a medium-severity CSRF (CWE-352) vulnerability in Fastify Passport. Its CVSS base score is 6.5 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 31th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2023-1154
Vulnerability Data
@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…
more
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`.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V3.3.2V3.5.1V10.2.1V4.4.4
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Requiring user re-entry of credentials for sensitive actions prevents automated forgery of requests without active user participation.
Session termination after a set interval shortens the usable lifetime of a fixed session identifier, making successful exploitation of session fixation more difficult.
Awareness training educates users on avoiding untrusted links and actions that can be exploited via CSRF.
Security testing regimens explicitly include checks for missing or ineffective anti-CSRF protections in web applications.
Enforces proper session ID generation and binding, preventing fixation of a known session token.
Detects anomalous request patterns consistent with cross-site request forgery.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Proper authentication processes must invalidate prior session identifiers to prevent fixation attacks.
Secure SDLC practices directly require anti-CSRF controls such as tokens or SameSite attributes.
Managing identities and credentials includes handling session identifiers as temporary credentials that must be invalidated on re-authentication.
Protecting and verifying identity assertions encompasses secure handling and regeneration of session tokens.
Configuration baselines can enforce session regeneration and timeout settings that block fixation.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing can detect session-fixation issues, yet the weakness absence does not replace comprehensive testing.
Access-control policy can mandate session invalidation on re-authentication, but does not prescribe the technical mechanism.
Identity-management procedures can require new session tokens after login, yet the control is broader than session handling.
Authentication-information rules can include session-token lifecycle requirements, but the control focuses on credential management.
By denying access to phishing or malicious sites, the control lowers the likelihood that a user will be tricked into submitting a forged request that performs an unintended action on another site.
Secure-SDLC requirement can embed session-fixation checks, but eliminating the weakness does not satisfy the full SDLC control.