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.
Published: 2026-11-02
Score: 4.2 Medium
EPSS: n/a
KEV: No
Impact: Bypass of session cookie signature verification allows reuse of existing session cookies without the signing secret
Action: Upgrade
AI Analysis

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.

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

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 yet.

History

Mon, 02 Nov 2026 10:30:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-11-02T10:26:30.731Z

Reserved: 2026-10-27T11:08:27.981Z

Link: CVE-2026-117549

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-02T11:17:30.997

Modified: 2026-11-02T11:17:30.997

Link: CVE-2026-117549

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-02T11:30:14Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature