{"id":"GHSA-4m3m-ppvx-xgw9","revision":"3f59bfb0c14a4b0c96786277def060a7","records":[{"revision":"3f59bfb0c14a4b0c96786277def060a7","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4m3m-ppvx-xgw9","aliases":["CVE-2023-29019"],"title":"Session fixation in fastify-passport","description":"Applications using `@fastify/passport` for user authentication, in combination with `@fastify/session` as the underlying session management mechanism, are vulnerable to [session fixation attacks](https://owasp.org/www-community/attacks/Session_fixation) from network and same-site attackers.\n\n## Details\nfastify 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](https://canitakeyoursubdomain.name/) 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.\n\n## Fix\nAs 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.\n\n## Credits\n* Pedro Adão (@pedromigueladao), [Instituto Superior Técnico, University of Lisbon](https://tecnico.ulisboa.pt/)\n* Marco Squarcina (@lavish), [Security & Privacy Research Unit, TU Wien](https://secpriv.wien/)","state":0,"publishedAt":"2023-04-21T22:33:30+00:00","modifiedAt":"2026-09-10T03:49:53.48342+00:00","affected":[{"ecosystem":"npm","name":"@fastify/passport","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@fastify/passport","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.3.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/fastify/fastify-passport/security/advisories/GHSA-4m3m-ppvx-xgw9","https://nvd.nist.gov/vuln/detail/CVE-2023-29019","https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11","https://github.com/fastify/fastify-passport","https://owasp.org/www-community/attacks/Session_fixation"],"sourceUrl":"https://github.com/advisories/GHSA-4m3m-ppvx-xgw9","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4m3m-ppvx-xgw9","identifiers":["GHSA-4m3m-ppvx-xgw9","CVE-2023-29019"]},"retained":false,"historicalAffected":[]}],"coverage":[]}