CVE-2024-35220
@fastify/session reuses destroyed session cookie
CVE-2024-35220 is a high vulnerability (CVSS 7.4) in Fastify Session, published May 21, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.45%, the 39th percentile. Fixed in @fastify/session 10.9.0.
- Severity
- 7.4 HighCVSS 3.1, CVE List
- Exploit chance
- 0.45%EPSS, 39th percentile
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
10.9.0@fastify/session
Description
@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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@fastify/sessionnpm | before 10.9.0 | 10.9.0 |
What each source reports
CVE List Score used 7.4
@fastify/session reuses destroyed session cookie
@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.
- Record
CVE-2024-35220- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-613
- Updated
- 2026-11-02
EUVDEUVD-2024-1716 7.4
@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.
- Record
EUVD-2024-1716- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-pj27-2xvp-4qxg 7.4
@fastify/session reuses destroyed session cookie
Impact
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.
Patches
Updating to v10.9.0 will solve this.
Workarounds
None
References
Publicly reported at: https://github.com/fastify/session/issues/251
- Record
GHSA-pj27-2xvp-4qxg- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-613
- Updated
- 2026-11-02
NVD 7.4
@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.
- Record
CVE-2024-35220- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-613
- Updated
- 2026-11-02
OSV 7.4
@fastify/session reuses destroyed session cookie
@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.
- Record
CVE-2024-35220- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-613
- Updated
- 2026-11-02
OSVGHSA-pj27-2xvp-4qxg 7.4
@fastify/session reuses destroyed session cookie
Impact
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.
Patches
Updating to v10.9.0 will solve this.
Workarounds
None
References
Publicly reported at: https://github.com/fastify/session/issues/251
- Record
GHSA-pj27-2xvp-4qxg- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-613
- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/fastify/session/security/advisories/GHSA-pj27-2xvp-4qxg
github.com/fastify/session/issues/251
github.com/fastify/session/commit/0495ce5b534c4550f25228821db8098293439f2f
nvd.nist.gov/vuln/detail/CVE-2024-35220
github.com/advisories/GHSA-pj27-2xvp-4qxg
github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35220.json
github.com/fastify/session