@fastify/session reuses destroyed session cookie
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-613.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastify | session | before 10.9.0 | 10.9.0 | Patch available | CNA |
| — | @fastify/session (npm) | before 10.9.0 | 10.9.0 | Patch available | GHSA-pj27-2xvp-4qxg |
- session Vendorfastify Affected before 10.9.0 Fixed in 10.9.0 Patch available CNA
- @fastify/session (npm) Vendor— Affected before 10.9.0 Fixed in 10.9.0 Patch available GHSA-pj27-2xvp-4qxg
Remediation
- Fix · CNA session (fastify) Fixed in 10.9.0
- Fix · GHSA-pj27-2xvp-4qxg @fastify/session (npm) Fixed in 10.9.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-35220
- 2026-10-03 Alias added: GHSA-pj27-2xvp-4qxg
References
More fastify vulnerabilities
- TI-2026-26180 @fastify/express vulnerable to middleware authentication bypass via URL normalization… CVSS 4.0CRITICAL 9.1
- TI-2026-26179 @fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2026-26177 @fastify/reply-from vulnerable to connection header abuse enabling stripping of proxy-added headers CVSS 4.0CRITICAL 9.0
- TI-2026-05498 @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2023-15307 Cross-site request forgery in npm @fastify/oauth2 CVSS 3.1HIGH 8.8
- TI-2022-18664 Denial of service in Fastify via Content-Type header CVSS 3.1HIGH 7.5
Sources
- CVE-2024-35220 · CVE Program
- CVE-2024-35220 · NVD
- FIRST EPSS
- GHSA-pj27-2xvp-4qxg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences