{"id":"CVE-2023-29019","summary":"Session fixation in fastify-passport","details":"@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.\n","aliases":["GHSA-4m3m-ppvx-xgw9"],"modified":"2026-04-10T04:57:19.112901Z","published":"2023-04-21T22:28:55.045Z","database_specific":{"cwe_ids":["CWE-384"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29019.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://owasp.org/www-community/attacks/Session_fixation"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29019.json"},{"type":"ADVISORY","url":"https://github.com/fastify/fastify-passport/security/advisories/GHSA-4m3m-ppvx-xgw9"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29019"},{"type":"FIX","url":"https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/fastify/fastify-passport","events":[{"introduced":"0"},{"fixed":"628664a0c86f489def6fd2303990ba059cca5417"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"1.1.0"}]}},{"type":"GIT","repo":"https://github.com/fastify/fastify-passport","events":[{"introduced":"673e5abc3f342170e65669c023cebb1f5f4b3784"},{"fixed":"30843bc2f201879950311ad422bc57747a98f35f"}],"database_specific":{"versions":[{"introduced":"2.0.0"},{"fixed":"2.3.0"}]}}],"versions":["v0.1.0","v0.2.0","v0.3.0","v0.4.1","v0.5.0","v1.0.0","v1.0.1","v2.0.0","v2.0.1","v2.1.0","v2.2.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-29019.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"}]}