Session fixation in fastify-passport
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Spoofing
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-384.
Summary
@fastify/passport is a port of passport authentication library for the Fastify ecosystem. Applications using `@fastify/passport` in affected versions for user authentication, in combination with `@fastify/session` as the underlying session management mechanism, are vulnerable to session fixation attacks from network and same-site attackers. fastify applications rely on the `@fastify/passport` library for user authentication. The login and user validation are performed by the `authenticate` function. When executing this function, the `sessionId` is preserved between the pre-login and the authenticated session. Network and same-site attackers can hijack the victim's session by tossing a valid `sessionId` cookie in the victim's browser and waiting for the victim to log in on the website. As a solution, newer versions of `@fastify/passport` regenerate `sessionId` upon login, preventing the attacker-controlled pre-session cookie from being upgraded to an authenticated session. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
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 | fastify-passport | before 1.1.0; 2.0.0 to before 2.3.0 | 1.1.0, 2.3.0 | Patch available | CNA |
| — | @fastify/passport (npm) | before 1.1.0 | 1.1.0 | Patch available | GHSA-4m3m-ppvx-xgw9 |
| — | @fastify/passport (npm) | 2.0.0 to before 2.3.0 | 2.3.0 | Patch available | GHSA-4m3m-ppvx-xgw9 |
- 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-4m3m-ppvx-xgw9
- @fastify/passport (npm) Vendor— Affected 2.0.0 to before 2.3.0 Fixed in 2.3.0 Patch available GHSA-4m3m-ppvx-xgw9
Remediation
- Fix · CNA fastify-passport (fastify) Fixed in 1.1.0, 2.3.0
- Fix · GHSA-4m3m-ppvx-xgw9 @fastify/passport (npm) Fixed in 1.1.0 Advisory →
- Fix · GHSA-4m3m-ppvx-xgw9 @fastify/passport (npm) Fixed in 2.3.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-29019
- 2026-10-03 Alias added: GHSA-4m3m-ppvx-xgw9
References
Advisory 2
More fastify Passport vulnerabilities
- TI-2023-13481 Cross site request forgery token fixation in fastify-passport CVSS 3.1MEDIUM 6.5
Sources
- CVE-2023-29019 · CVE Program
- CVE-2023-29019 · NVD
- FIRST EPSS
- GHSA-4m3m-ppvx-xgw9 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences