{"id":"CVE-2026-117549","kind":"vulnerability","aliases":["CVE-2026-117549"],"related":[],"title":"@fastify/secure-session: stale signed cookies still decrypt after signing secret rotation","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.","summary":"@fastify/secure-session, a Fastify session plugin, versions 7.5.0 through 8.4.1 decrypt a session even when its cookie signature fails validation when the signed cookie option is set. An attacker holding an old, unexpired session cookie can strip the invalid signature and keep using that session after the signing secret is rotated.","severity":"medium","cvss":4.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["fastify","node.js","package","session-management"],"not_affected_if":["default-config","encryption-key-rotated-with-signing-secret","no-signed-cookie-option"],"how_to_check":"- Check the installed version of `@fastify/secure-session` in `package-lock.json`, `pnpm-lock.yaml` or `yarn.lock`, or with `npm ls @fastify/secure-session`.\n- Look for `signed` cookie options set on the session plugin registration and whether the signing secret is rotated separately from the encryption key.","fix":"- `@fastify/secure-session`: upgrade to `8.4.2`\n- Workaround stated by the source: rotate the session encryption key rather than relying on rotation of the cookie signing secret alone.","status":"open","published_at":"2026-11-02T11:17:30+00:00","first_seen_at":"2026-11-02T11:22:53+00:00","triaged_at":"2026-11-02T11:24:21+00:00","updated_at":"2026-11-02T11:24:21+00:00","category":"package","confidence":0.75,"triage":{"at":"2026-11-02T11:24:21Z","model":"claude-haiku-5-5","output":{"fix":"- `@fastify/secure-session`: upgrade to `8.4.2`\n- Workaround stated by the source: rotate the session encryption key rather than relying on rotation of the cookie signing secret alone.","reach":"internet","title":"@fastify/secure-session: stale signed cookies still decrypt after signing secret rotation","impact":"medium","summary":"@fastify/secure-session, a Fastify session plugin, versions 7.5.0 through 8.4.1 decrypt a session even when its cookie signature fails validation when the signed cookie option is set. An attacker holding an old, unexpired session cookie can strip the invalid signature and keep using that session after the signing secret is rotated.","audience":"developers","category":"package","nicknames":[],"who_cares":["fastify","node.js","session-management"],"confidence":0.75,"fix_status":"available","needs_auth":"yes","worst_case":"attacker keeps using a previously issued session cookie after rotation","analyst_note":"","how_to_check":"- Check the installed version of `@fastify/secure-session` in `package-lock.json`, `pnpm-lock.yaml` or `yarn.lock`, or with `npm ls @fastify/secure-session`.\n- Look for `signed` cookie options set on the session plugin registration and whether the signing secret is rotated separately from the encryption key.","plain_action":"","needs_analyst":false,"not_affected_if":["default-config","no-signed-cookie-option","encryption-key-rotated-with-signing-secret"],"who_is_affected":"Applications that use @fastify/secure-session with the signed cookie option and that rotate only the cookie signing secret to end existing sessions. The attacker needs an existing unexpired encrypted session cookie but no secret. Applications that do not set the signed cookie option, or that rotate the encryption key when they rotate sessions, are not exposed.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.00078,"input_tokens":4421,"output_tokens":676,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-117549':13A,16A '-2026':12A,15A '7.5.0':29B,90C '8.4.1':31B,92C '8.4.2':227C,251C 'activ':173C 'alon':272C 'alreadi':196C 'anyway':139C 'appear':143C 'applic':146C 'attack':50B,194C 'call':104C 'cannot':208C 'check':113C,244C 'configur':97C 'cooki':4A,38B,45B,56B,87C,101C,106C,123C,149C,181C,202C,237C,269C 'cve':11A,14A 'data':211C 'decod':128C,231C 'decrypt':6A,32B,138C 'effect':142C 'encrypt':83C,156C,171C,200C,219C,260C 'even':35B 'exist':166C 'expiri':213C 'extend':212C 'fail':40B,245C 'fastifi':17B,25B,79C 'fastify/secure-session':1A,23B,73C,226C 'fix':224C 'forg':209C 'hold':51B 'holder':176C 'independ':152C 'invalid':60B,118C 'issu':222C 'keep':63B,169C,189C 'key':157C,172C,220C,261C 'later':253C 'longer':230C 'manag':22B 'must':195C 'need':204C 'neither':205C 'node.js':18B 'obsolet':186C 'old':53B,179C 'option':46B,102C,238C 'origin':122C 'packag':19B 'pass':120C 'plugin':27B,77C,95C 'possess':197C 'practic':141C 'rather':262C 'reli':264C 'report':114C 'retir':165C 'rotat':10A,72B,159C,216C,257C,266C 'routin':108C 'secret':9A,70B,151C,163C,206C,271C 'session':21B,26B,34B,55B,66B,76C,84C,127C,131C,155C,167C,180C,192C,201C,210C,233C,259C 'session-manag':20B 'set':48B,240C 'sign':3A,8A,44B,69B,100C,150C,162C,236C,270C 'signatur':39B,61B,112C,133C,187C,243C 'stale':2A 'still':5A,119C 'store':81C 'strip':58B,183C 'suppli':147C 'surviv':215C 'unexpir':54B,199C 'unsign':107C 'upgrad':249C 'use':64B,190C 'user':247C 'valid':41B,136C 'valu':116C,124C 'version':28B,89C 'whose':132C 'workaround':256C","nicknames":[],"mitigations":[],"who_affected":"Applications that use @fastify/secure-session with the signed cookie option and that rotate only the cookie signing secret to end existing sessions. The attacker needs an existing unexpired encrypted session cookie but no secret. Applications that do not set the signed cookie option, or that rotate the encryption key when they rotate sessions, are not exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["fastify","medium","nodejs","package","sessionmanagement"],"first_public_at":"2026-11-02T09:08:42+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","cvss_by":"ce714d77-add3-4f53-aff5-83d477b104bb","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-117549","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-117549","severity":null,"published_at":"2026-11-02T11:17:30+00:00","modified_at":"2026-11-02T11:17:30+00:00","first_seen_at":"2026-11-02T11:22:53+00:00","fetched_at":"2026-11-02T11:22:53+00:00","note":null}],"documents":[{"id":51564,"url":"https://github.com/fastify/fastify-secure-session/security/advisories/GHSA-4cgq-x5f7-r8jv","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-02T09:08:42+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}