Katalog CVE

CVE-2026-117549

ŚrednieCVSS 4.2
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

Wtyczka @fastify/secure-session w wersjach 7.5.0–8.4.1, gdy skonfigurowana z opcją podpisanego ciasteczka, wywołuje procedurę unsign, ale gdy weryfikacja podpisu zgłasza nieprawidłowość, nadal przekazuje oryginalną wartość ciasteczka do dekodera sesji, więc sesja z nieprawidłowym podpisem jest odszyfrowywana. Ma to znaczenie, gdy aplikacja używa osobnego sekretu podpisywania i rotuje tylko ten sekret, aby wycofać sesje, zachowując klucz szyfrowania.

Ocena ryzyka

Posiadacz starego ciasteczka sesji może usunąć nieaktualny podpis i nadal korzystać z sesji, co narusza oczekiwane unieważnienie sesji. Atakujący musi już posiadać nieprzeterminowane zaszyfrowane ciasteczko sesji i nie może sfałszować danych sesji ani wydłużyć ważności.

Rekomendacja

Zaktualizuj @fastify/secure-session do wersji 8.4.2 lub nowszej. Jako obejście rotuj klucz szyfrowania sesji zamiast polegać wyłącznie na rotacji sekretu podpisywania ciasteczka.

Powiązane podatności

Oryginalny opis (angielski, źródło NVD)

@fastify/secure-session is a session plugin for Fastify that stores an encrypted session in a cookie. In versions 7.5.0 through 8.4.1, when the plugin is configured with the signed cookie option, it calls the cookie unsign routine but, when the signature check reports the value as invalid, still passes the original cookie value to the session decoder, so a session whose signature did not validate is decrypted anyway. The practical effect appears when an application supplies the cookie signing secret independently of the session encryption key and rotates only the signing secret to retire existing sessions while keeping the encryption key active, because a holder of an old session cookie can strip the now obsolete signature and keep using the session. The attacker must already possess an unexpired encrypted session cookie and needs neither secret, and cannot forge session data, extend expiry, or survive rotation of the encryption key. The issue is fixed in @fastify/secure-session 8.4.2, which no longer decodes the session when the signed cookie option is set and the signature check fails, and users should upgrade to 8.4.2 or later. As a workaround, rotate the session encryption key rather than relying on rotation of the cookie signing secret alone.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS