What’s Vulnerable › Vulnerabilities
CVE-2024-35220: @fastify/session reuses destroyed session cookie
- Severity: high (CVSS 7.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-21 · updated 2026-06-17
- Weakness: CWE-613
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.
Affected products
- fastify session: through 10.8.0
References
- https://github.com/fastify/session/commit/0495ce5b534c4550f25228821db8098293439f2f
- https://github.com/fastify/session/issues/251
- https://github.com/fastify/session/security/advisories/GHSA-pj27-2xvp-4qxg
- https://github.com/fastify/session/commit/0495ce5b534c4550f25228821db8098293439f2f
- https://github.com/fastify/session/issues/251
- https://github.com/fastify/session/security/advisories/GHSA-pj27-2xvp-4qxg
Get alerted when CVE-2024-35220 or the next vulnerability affects your stack