CVE-2023-29019Fastify Passport
High 8.1 No auth needed
Follow: this CVE · Fastify · Fastify Passport We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 3.1
- 8.1
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 60
- Auth required
- No
- Published
- Apr 21, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-384
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
What happens
@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.
What to do
- Apply the vendor's security update for Passport.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @fastify/passport |
< 1.1.0 |
1.1.0 |
npm install @fastify/passport@1.1.0 |
| npm | @fastify/passport |
≥ 2.0.0 < 2.3.0 |
2.3.0 |
npm install @fastify/passport@2.3.0 |
Per OSV / GitHub Advisories (GHSA-4m3m-ppvx-xgw9). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastify | passport | < 1.1.0 |
| fastify | passport | ≥ 2.0.0 < 2.3.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Vendor Advisory
- owasp.org Technical Description