High
@fastify/session reuses destroyed session cookie
Type: advisorySources: OSV
@fastify/session is a session plugin for fastify. Requires the @fastify/cookie plugin. When restoring the cookie from the session store, the `expires` field is overriden if the `maxAge` field was set. This means a cookie is never correctly detected as expired and thus expired sessions are not destroyed. This vulnerability has been patched 10.8.0.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-35220
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 02:35 UTC · Revision 1
Source evidence
@fastify/session reuses destroyed session cookie
core-osv · Original sourcePublished 21 May 2024, 20:26 UTC
@fastify/session is a session plugin for fastify. Requires the @fastify/cookie plugin. When restoring the cookie from the session store, the `expires` field is overriden if the `maxAge` field was set. This means a cookie is never correctly detected as expired and thus expired sessions are not destroyed. This vulnerability has been patched 10.8.0.
osv:CVE-2024-35220
Complete source record
{
"id": "5fd8b5102b4fec2eb7bcd71bab841834cf9f8a07121f794133d8087c76c96999",
"url": "https://osv.dev/vulnerability/CVE-2024-35220",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "@fastify/session reuses destroyed session cookie",
"summary": "@fastify/session is a session plugin for fastify. Requires the @fastify/cookie plugin. When restoring the cookie from the session store, the `expires` field is overriden if the `maxAge` field was set. This means a cookie is never correctly detected as expired and thus expired sessions are not destroyed. This vulnerability has been patched 10.8.0.",
"evidence": "osv:CVE-2024-35220",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2024-35220",
"aliases": [
"CVE-2024-35220",
"GHSA-pj27-2xvp-4qxg"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/fastify/session",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "742e1dcadbe43f32d8628b3e0bc5546e21ef5615"
},
{
"fixed": "0495ce5b534c4550f25228821db8098293439f2f"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "10.9.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "0495ce5b534c4550f25228821db8098293439f2f"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v10.8.0",
"v10.7.2",
"v10.7.1",
"v10.7.0",
"v10.6.1",
"v10.6.0",
"v10.5.0",
"v10.4.0",
"v10.3.1",
"v10.3.0",
"v10.2.1",
"v8.2.0",
"v10.2.0",
"v10.1.1",
"v10.1.0",
"v10.0.2",
"v10.0.1",
"v10.0.0",
"v9.0.0",
"v8.1.0",
"v8.0.0",
"v7.0.0",
"v6.5.1",
"v6.5.0",
"v6.4.0",
"v6.3.0",
"v6.2.2",
"v6.2.1",
"v6.2.0",
"v6.1.1",
"v6.1.0",
"v6.0.1",
"v6.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35220.json"
}
}
],
"modified": "2026-10-28T02:30:49.112166769Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35220.json",
"https://github.com/fastify/session/security/advisories/GHSA-pj27-2xvp-4qxg",
"https://nvd.nist.gov/vuln/detail/CVE-2024-35220",
"https://github.com/fastify/session/issues/251",
"https://github.com/fastify/session/commit/0495ce5b534c4550f25228821db8098293439f2f"
],
"provider_metadata": {
"cwe_ids": [
"CWE-613"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35220.json"
}
},
"related_cves": [
{
"value": "CVE-2024-35220",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 517408,
"published_at": "2024-05-21T20:26:53.312+00:00"
}