CVE-2026-117549

@fastify/secure-session vulnerable to signature verification bypass via cookie signature removal

Published Nov 2, 2026 CVSS 3.1 · 4.2 Medium EPSS < 1% KEV · Not listed
Description
@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.

Analysis

AI-generated

Technical impact

When @fastify/secure-session is configured with signed cookies, it incorrectly continues to decode a session even if the signature validation fails. Consequently, an attacker who already possesses a valid, encrypted session cookie can simply remove the cookie's now‑invalid signature and continue to use the session data as if it were still legitimate. The attacker does not need the signing secret, encryption key, or the ability to forge session content, and the flaw does not allow the attacker to extend the session expiry or adapt to encryption key rotation. This results in continued access to the original session’s data, potentially persisting until the encryption key is rotated.

Affected Systems

The vulnerability affects the @fastify/secure-session plugin version range 7.5.0 through 8.4.1. Applications built on Fastify that rely on this plugin with the signed cookie option are the target for upgrade action.

Risk and Exploitability

The CVSS score of 4.2 indicates a moderate severity. The EPSS score is unavailable and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is client‑side cookie tampering; an attacker must already possess a valid, unexpired session cookie but requires neither signing secret nor encryption key. While the flaw does not enable arbitrary session forging, it grants continued use of the attacker’s existing session until the encryption key is updated. Given the moderate CVSS and the necessity of a pre‑existing session cookie, the exploitation risk is limited but non‑negligible for systems that rely on signed cookies for session protection.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @fastify/secure-session to 8.4.2 or later to eliminate the signature‑bypass behavior.
  • If immediate upgrade is not feasible, rotate the session encryption key rather than relying solely on the cookie signing secret rotation, as recommended by the advisory.
  • Monitor for unusual session activity or repeated use of legacy session cookies to identify potential exploitation attempts.

Generated by OpenCVE AI on November 2, 2026 at 11:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Fastify
Fastify secure-session
Vendors & Products Fastify
Fastify secure-session
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description @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.
Title @fastify/secure-session vulnerable to signature verification bypass via cookie signature removal
Weaknesses CWE-347
References
Metrics cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature

Sources

Status
PUBLISHED
Assigner
openjs
Published
Updated
Nov 2, 2026, 4:59 PM
Reserved
Oct 27, 2026, 11:08 AM
Status
Awaiting Analysis
Published
Nov 2, 2026, 11:17 AM
Modified
Nov 2, 2026, 5:17 PM
Severity
Moderate
Public date
Nov 2, 2026, 10:26 AM