PT-2024-24349 · Npm · @Festify/Secure-Session

Adamkorcz

+1

·

Published

2024-04-10

·

Updated

2024-04-10

·

CVE-2024-31999

CVSS v3.1

7.4

High

VectorAV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
Name of the Vulnerable Software and Affected Versions @festify/secure-session versions prior to 7.3.0
Description The issue exists in the session removal process of @festify/secure-session. When a session is deleted, it is marked for deletion, but if an attacker gains access to the cookie, they could keep using it forever. The plugin creates a secure stateless cookie session for Fastify, encrypting data in the session with a secret key and attaching the ciphertext as a cookie value. When an encrypted cookie with a matching session name is provided with subsequent requests, it decrypts the ciphertext to get the data and creates a new session.
Recommendations For versions prior to 7.3.0, update to version 7.3.0 to resolve the issue. As a temporary workaround, consider including a "last update" field in the session and treat "old sessions" as expired. Make sure to configure your cookie as "http only" to minimize the risk of exploitation.

Exploit

Fix

Insufficient Session Expiration

Weakness Enumeration

Related Identifiers

CVE-2024-31999
GHSA-9WWP-Q7WQ-JX35

Affected Products

@Festify/Secure-Session