Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @fastify/session
  4. ›
  5. CVE-2024-35220

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

May 21, 2024

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.

References

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

Code Behaviors & Features

Detect and mitigate CVE-2024-35220 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 10.9.0

Fixed versions

  • 10.9.0

Solution

Upgrade to version 10.9.0 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-613: Insufficient Session Expiration

Source file

npm/@fastify/session/CVE-2024-35220.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:46 +0000.