CVE-2024-31999
CVE-2024-31999 is a high-severity vulnerability with a CVSS 3.x base score of 7.4. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-613.
Key facts
- Severity: High (CVSS 3.x base score 7.4)
- EPSS exploit prediction: 1% (45th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-1178
- Weakness: CWE-613
- Published:
- Last modified:
Description
@festify/secure-session creates a secure stateless cookie session for Fastify. At the end of the request handling, it will encrypt all data in the session with a secret key and attach the ciphertext as a cookie value with the defined cookie name. After that, the session on the server side is destroyed. When an encrypted cookie with matching session name is provided with subsequent requests, it will decrypt the ciphertext to get the data. The plugin then creates a new session with the data in the ciphertext. Thus theoretically the web instance is still accessing the data from a server-side session, but technically that session is generated solely from a user provided cookie (which is assumed to be non-craftable because it is encrypted with a secret key not known to the user). The issue exists in the session removal process. In the delete function of the code, when the session is deleted, it is marked for deletion. However, if an attacker could gain access to the cookie, they could keep using it forever. Version 7.3.0 contains a patch for the issue. As a workaround, one may include a "last update" field in the session, and treat "old sessions" as expired.
Frequently asked questions
- What is CVE-2024-31999?
- @festify/secure-session creates a secure stateless cookie session for Fastify. At the end of the request handling, it will encrypt all data in the session with a secret key and attach the ciphertext as a cookie value with the defined cookie name. After that, the session on the server side is destroyed. When an encrypted cookie with matching session name is provided with subsequent requests, it will decrypt the ciphertext to get the data. The plugin then creates a new session with the data in the ciphertext. Thus theoretically the web instance is still accessing the data from a server-side session, but technically that session is generated solely from a user provided cookie (which is assumed to be non-craftable because it is encrypted with a secret key not known to the user). The issue exists in the session removal process. In the delete function of the code, when the session is deleted, it is marked for deletion. However, if an attacker could gain access to the cookie, they could keep using it forever. Version 7.3.0 contains a patch for the issue. As a workaround, one may include a "last update" field in the session, and treat "old sessions" as expired.
- How severe is CVE-2024-31999?
- CVE-2024-31999 has a CVSS 3.x base score of 7.4, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is high, integrity none, and availability none.
- Is CVE-2024-31999 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (45th percentile), an estimate of the probability of exploitation in the next 30 days.
- How do I fix CVE-2024-31999?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2024-31999 have an EU (EUVD) identifier?
- Yes. CVE-2024-31999 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-1178.
- When was CVE-2024-31999 published?
- CVE-2024-31999 was published on 2024-04-10 and last updated on 2026-06-17.
References
- https://github.com/fastify/fastify-secure-session/commit/56d66642ecc633cff0606927601e81cdac361370
- https://github.com/fastify/fastify-secure-session/security/advisories/GHSA-9wwp-q7wq-jx35
Other CWE-613 (Insufficient Session Expiration) vulnerabilities
- CVE-2024-8888 — Critical (CVSS 10.0): An attacker with access to the network where CIRCUTOR Q-SMT is located in its firmware version 1.0.4, could steal the…
- CVE-2026-46455 — Critical (CVSS 9.8): Insufficient Session Expiration vulnerability in Apache Camel Keycloak Component. The camel-keycloak security helper…
- CVE-2026-21622 — Critical (CVSS 9.8): Insufficient Session Expiration vulnerability in hexpm hexpm/hexpm ('Elixir.Hexpm.Accounts.PasswordReset' module)…
- CVE-2025-59786 — Critical (CVSS 9.8): 2N Access Commander version 3.4.2 and prior improperly invalidates session tokens, allowing multiple session cookies to…
- CVE-2026-26342 — Critical (CVSS 9.8): Tattile Smart+, Vega, and Basic device families firmware versions 1.181.5 and prior implement an authentication token…
- CVE-2026-1435 — Critical (CVSS 9.8): Not properly invalidated session vulnerability in Graylog Web Interface, version 2.2.3, due to incorrect management of…
Browse all CWE-613 (Insufficient Session Expiration) vulnerabilities →