{"id":"CVE-2023-29019","published":"2023-04-21T22:28:55Z","modified":"2025-02-04T19:38:59Z","title":"Session fixation in fastify-passport","vendor":"fastify","product":"fastify-passport","tier":"tail","description":{"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.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00751,"percentile":0.559,"provenance":"source"},"cwes":[{"id":"CWE-384","name":"Session Fixation"}],"references":[{"url":"https://github.com/fastify/fastify-passport/security/advisories/GHSA-4m3m-ppvx-xgw9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11","tags":["x_refsource_MISC"]},{"url":"https://owasp.org/www-community/attacks/Session_fixation","tags":["x_refsource_MISC"]}],"priority":{"score":16.9,"factors":[{"name":"EPSS percentile","points":11.18},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify-passport","versions":["< 1.1.0",">= 2.0.0, < 2.3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-02-04T19:38:54.508489Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@fastify/passport","vulnerableRanges":["<1.1.0",">=2.0.0, <2.3.0"],"patched":["1.1.0","2.3.0"],"from":["GHSA-4m3m-ppvx-xgw9"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-1192","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-fastify-passport-cve-2023-29019","children":[{"from":"CVE-2023-29019","to":"CVE-2023-29020","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/session-managers/SecureSessionManager.ts"],"commits":["https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11","https://github.com/fastify/fastify-passport/commit/07c90feab9cba0dd4779e47cfb0717a7e2f01d3d"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.56,"basis":"same product + CWE + description similarity"}]}]}}