CVE-2024-35220fastify session
High 7.4 No auth needed
Follow: this CVE · fastify · fastify session We alert you by email or Slack (account required).
- Priority
- 59
- CVSS 3.1
- 7.4
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 54
- Auth required
- No
- Published
- May 21, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-613
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
What happens
@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.
What to do
- Apply the vendor's security update for session.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @fastify/session |
< 10.9.0 |
10.9.0 |
npm install @fastify/session@10.9.0 |
Per OSV / GitHub Advisories (GHSA-pj27-2xvp-4qxg). Check the version in your lockfile before upgrading.
Affected products
- fastify · session
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.