# CVE-2024-35220: @fastify/session reuses destroyed session cookie

- Priority: **Routine**
- Reason: Not severe (CVSS 7.4, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-05-21 · Modified: 2024-08-02
- Aliases: GHSA-pj27-2xvp-4qxg
- Record: https://cvemate.com/vulnerability/CVE-2024-35220 · JSON: https://cvemate.com/vulnerability/CVE-2024-35220/json

## Description

```text
@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.
```

## Signals

- CVSS: 7.4 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
- EPSS: 0.445%, percentile 40.457%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- fastify session: \< 10.9.0
- @fastify session (Npm): \< 10.9.0

## References

- <https://github.com/fastify/session/security/advisories/GHSA-pj27-2xvp-4qxg>
- <https://github.com/fastify/session/issues/251>
- <https://github.com/fastify/session/commit/0495ce5b534c4550f25228821db8098293439f2f>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-35220>
- <https://github.com/fastify/session>

---

Data as of 2026-12-05T09:21:48.770Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
