{"id":"CVE-2023-29019","aliases":["CVE-2023-29019","GHSA-4m3m-ppvx-xgw9"],"related":[],"kind":"vulnerability","state":"published","title":"Session fixation in fastify-passport","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@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.","source":"cvelist"},{"lang":"en","text":"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/)","format":"markdown","source":"ghsa"}],"published":"2023-04-21T22:28:55.045Z","modified":"2026-09-10T03:49:53.483Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"}],"cwes":["CWE-384"],"affected":[{"ranges":[{"version":"< 1.1.0","status":"affected"},{"version":">= 2.0.0, < 2.3.0","status":"affected"}],"vendor":"fastify","product":"fastify-passport","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.0"}],"ecosystem":"npm","package":"@fastify/passport","purl":"pkg:npm/%40fastify/passport","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.3.0"}],"ecosystem":"npm","package":"@fastify/passport","purl":"pkg:npm/%40fastify/passport","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.1.0"},{"status":"affected","introduced":"2.0.0","fixed":"2.3.0"}],"vendor":"fastify","product":"passport","cpe":"cpe:2.3:a:fastify:passport:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fastify/fastify-passport/security/advisories/GHSA-4m3m-ppvx-xgw9","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://owasp.org/www-community/attacks/Session_fixation","tags":["technical-description","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29019","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify-passport","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-02-04T19:38:54.508Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-29019","url":"https://www.cve.org/CVERecord?id=CVE-2023-29019","licence":"CVE Terms of Use","modified":"2025-02-04T19:38:59.862Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4m3m-ppvx-xgw9","url":"https://github.com/advisories/GHSA-4m3m-ppvx-xgw9","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:53.483Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-29019","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29019","licence":"Public domain","modified":"2026-06-17T05:49:12.160Z"}],"updatedAt":"2026-11-25T22:58:23.687Z","epss":{"score":0.00751,"percentile":0.56234,"date":"2026-12-02T12:00:21.000Z"}}