Skip to main content

@fastify/secure-session CVE-2026-117549

| EUVDEUVD-2026-115124 MEDIUM
Improper Verification of Cryptographic Signature (CWE-347)
2026-11-02 openjs
4.2
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Possess old unexpired encrypted session cookie
  2. Exploit
    Strip now-obsolete cookie signature
  3. Execution
    Submit cookie despite failed unsign check
  4. Impact
    Continue using supposedly-retired session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
Exploitation Conditions

Exploitation requires a specific, non-default operational pattern, all of which must hold: (1) the plugin is configured with cookie.signed: true; (2) the @fastify/cookie signing secret is supplied independently of the session encryption key; and (3) the operator rotates ONLY the signing secret to retire existing sessions while leaving the session encryption key active. In addition, the attacker must already possess an unexpired encrypted session cookie from before the rotation. Key limiting factors: it does not work against default single-secret setups, the attacker needs neither secret but cannot create a session they never had, cannot forge or modify session contents, cannot extend session expiry, and is fully defeated by rotating the session encryption key (the first entry in the key array) - which is also the documented workaround. These constraints make real-world exploitability narrow despite the network attack vector.

Impact

This is a genuinely low-to-moderate priority issue rather than a high-urgency one, and the signals agree. The CVSS 3.1 base score is 4.2 (Medium) with vector AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N: network-reachable but high complexity, requiring low privileges and no user interaction, with only Low confidentiality and integrity impact and no availability impact. The vuln.today decision label is 'this_month', consistent with a moderate, non-emergency fix cadence. No EPSS probability was provided in the input, so exploitation likelihood cannot be quantified. The vulnerability is NOT on the CISA KEV list and there is no public exploit identified at time of analysis - the only references are the GHSA/OpenJS advisory itself, not working exploit code. The AC:H and the real-world impact are gated by a narrow operational pattern (see exploitation_conditions): it only matters when an operator rotates the cookie signing secret alone, independently of the still-active session encryption key. Note a nuance in the PR:L rating: the attacker does not need either secret, but must already hold a previously-valid (now supposedly retired) encrypted session cookie, which is why PR:L rather than PR:N is appropriate. The attacker cannot forge session data, extend expiry, or survive rotation of the encryption key, which caps the practical blast radius. Net: a real correctness/access-control defect worth patching, but not a widespread or weaponizable threat on current evidence.

Exploit ScenarioDerived

An operator rotates only the @fastify/cookie signing secret to invalidate existing sessions while keeping the session encryption key unchanged. A user who still holds an old, unexpired encrypted session cookie strips the now-invalid signature from it and resubmits it; because the plugin decrypts the value even though unsignCookie reported the signature invalid, the supposedly-retired session continues to work. No public exploit code is identified at time of analysis, and the attacker needs neither the signing secret nor the encryption key.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 02, 2026

Signature verification bypass in @fastify/secure-session 7.5.0 through 8.4.1 allows a holder of an already-issued encrypted session cookie to keep using that session after the cookie signature has been invalidated. When cookie.signed is enabled the plugin calls the cookie unsign routine but, if the signature check reports invalid, it still hands the original cookie value to the session decoder, so the session is decrypted anyway; the practical effect appears only when an application supplies the @fastify/cookie signing secret independently of the session encryption key and retires sessions by rotating just the signing secret. The CVSS vector (AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N) reflects that the attacker must already possess an unexpired encrypted session cookie, needs neither secret, and cannot forge session data, extend expiry, or survive rotation of the encryption key; no public exploit code or confirmed active exploitation was identified at time of analysis, and the vendor-supplied fix is 8.4.2.

RemediationAI

Upgrade to @fastify/secure-session 8.4.2 or later, which no longer decodes the session when cookie.signed: true is set and the signature check fails (vendor advisory: https://github.com/fastify/fastify-secure-session/security/advisories/GHSA-4cgq-x5f7-r8jv). Where upgrading is not immediately possible, the documented workaround is to rotate the session encryption key - the first entry in the key array - so that previously issued cookies can no longer be decrypted; note this invalidates every existing session for all users, which is the intended effect and the trade-off to plan for. Relying on rotation of the @fastify/cookie signing secret alone does not retire sessions on vulnerable versions, because the signature is ignored when it fails to validate. Applications that never enabled cookie.signed, or that use a single shared secret for signing and encryption, do not exhibit the described bypass.

Affected VersionsENISA

@fastify/secure-session 7.5.0 <8.4.2

Affected Packages

euvd fastify_secure_session fix: 8.4.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The plugin stores session state entirely client-side as an encrypted cookie, and with cookie.signed enabled it also asks @fastify/cookie to verify an HMAC signature over that value. The root cause is CWE-347, improper verification of a cryptographic signature: the return value of the unsign routine was consulted but not enforced, so the invalid-signature branch fell through to the decoder with the original cookie value rather than rejecting the request. Because the confidentiality and integrity of the payload depend on the encryption key, not the signature, this is not a decryption break - it is a failure of the signature to act as a revocation and integrity gate. The bypass is only meaningful when the two secrets are operationally independent (signing secret supplied separately from the session encryption key) and an operator rotates only the signing secret while leaving the encryption key live, treating signature rotation as a session-retirement mechanism. It does not work in the default single-secret configuration, does not let an attacker mint a session they never held, and is fully defeated by rotating the encryption key.

Know when Fastify Secure Session gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY 4.2 MEDIUM
AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 4.2 MEDIUM

AC:H reflects the required non-default secret-rotation deployment (a condition outside the attacker's control); PR:L because the attacker must already hold a previously-valid session cookie; C:L/I:L for continued access to and use of a session that should have been retired.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Nov 02, 2026 - 12:16 EUVD

DescriptionCVE.org

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

Threat Intelligence Overview

Prevalence
Low
specific Fastify session plugin, modest npm adoption within Node ecosystem
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

21
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +21
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy