Session fixation in fastify-passport
@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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-29019
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 03:06 UTC · Revision 1
Source evidence
@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.
osv:CVE-2023-29019
Complete source record
{
"id": "c30c8628d309c278f64529d764acf37acabf3f661fa8451ba724d6bcfd7e947b",
"url": "https://osv.dev/vulnerability/CVE-2023-29019",
"method": "structured",
"payload": {
"kind": "advisory",
"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.",
"evidence": "osv:CVE-2023-29019",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2023-29019",
"aliases": [
"CVE-2023-29019",
"GHSA-4m3m-ppvx-xgw9"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/fastify/fastify-passport",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "628664a0c86f489def6fd2303990ba059cca5417"
},
{
"introduced": "673e5abc3f342170e65669c023cebb1f5f4b3784"
},
{
"fixed": "30843bc2f201879950311ad422bc57747a98f35f"
},
{
"fixed": "43c82c321db58ea3e375dd475de60befbfcf2a11"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:fastify:passport:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.1.0"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:fastify:passport:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "43c82c321db58ea3e375dd475de60befbfcf2a11"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.0.1",
"v2.2.0",
"v2.1.0",
"v2.0.1",
"v2.0.0",
"v1.0.0",
"v0.5.0",
"v0.4.1",
"v0.3.0",
"v0.2.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-29019.json"
}
}
],
"modified": "2026-10-28T02:30:33.018275769Z",
"provider": "osv",
"references": [
"https://owasp.org/www-community/attacks/Session_fixation",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29019.json",
"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"
],
"provider_metadata": {
"cwe_ids": [
"CWE-384"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29019.json"
}
},
"related_cves": [
{
"value": "CVE-2023-29019",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 499908,
"published_at": "2023-04-21T22:28:55.045+00:00"
}