Skip to main content

Node cookies: cookies is a Node.js library for reading and writing HTTP cookies, used by Koa via ctx.cookies. (CVE-2026-88038)

0
Medium
Published: 09/10/2026 (09/10/2026, 13:20:00 UTC)
Source: GCVE Database
Product: node-cookies

Description

The Node.js library 'cookies', used by Koa via ctx.cookies, has a Set-Cookie attribute injection vulnerability in versions before 0.9.2. The domain and path options are validated permissively, allowing semicolons and enabling injection of additional cookie attributes. This can override security attributes like SameSite, Secure, HttpOnly, or Domain on cookies issued by the application. The issue is fixed in version 0.9.2 by stricter validation of domain and path values. Applications should avoid using untrusted input for these options as a workaround.

CVSS v3.1

Score 4.8medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected software

Ubuntu:16.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=xenial
Affected versions
=0.5.0-1
Ubuntu:18.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=bionic
Affected versions
=0.5.0-1=0.5.0-1ubuntu1
Ubuntu:20.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=focal
Affected versions
=0.5.0-3=0.8.0-1=0.8.0-2
Ubuntu:22.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=jammy
Affected versions
=0.8.0-2=0.8.0+~0.7.7-1
Ubuntu:24.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=noble
Affected versions
=0.8.0+~0.7.7-1
Ubuntu:26.10more threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=stonking
Affected versions
=0.9.1+~0.9.2-1
Ubuntu:26.04:LTSmore threats →ghsa
node-cookies
pkg:deb/ubuntu/node-cookies?arch=source&distro=resolute
Affected versions
=0.8.0+~0.7.7-1=0.9.1+~0.9.2-1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/17/2026, 23:20:50 UTC

Technical Analysis

The 'cookies' Node.js library prior to version 0.9.2 validates cookie names and values correctly to reject semicolons but applies only permissive RFC 7230 field-content validation to the domain and path options, which allows semicolons. These options are written unescaped into the Set-Cookie header, enabling an attacker who can supply untrusted or request-derived data in domain or path to inject additional cookie attributes. This can override security controls such as SameSite, Secure, HttpOnly, or Domain attributes on cookies issued by the application. The vulnerability is classified as a Set-Cookie attribute injection (CWE-74). The fix in version 0.9.2 enforces validation of domain and path against RFC 6265 character sets, preventing injection. As a mitigation, applications should ensure domain and path values are set by the application and not derived from untrusted input.

Potential Impact

An attacker able to influence the domain or path options of cookies can inject additional Set-Cookie attributes, potentially weakening cookie security by overriding SameSite, Secure, HttpOnly, or Domain attributes. This could lead to cookie manipulation or theft scenarios depending on the application context. The CVSS 3.1 score is 4.8 (medium severity), reflecting limited impact with network attack vector, high attack complexity, no privileges required, no user interaction, and partial confidentiality and integrity impact.

Mitigation Recommendations

Upgrade the 'cookies' library to version 0.9.2 or later, which includes proper validation of domain and path options against RFC 6265 character sets. As a workaround, ensure that domain and path options are set explicitly by the application and not derived from untrusted or request-supplied input to prevent injection of cookie attributes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
UBUNTU-CVE-2026-88038
Osv Schema Version
1.7.0
Ecosystems
["Ubuntu:16.04:LTS","Ubuntu:18.04:LTS","Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.10","Ubuntu:26.04:LTS"]
Cvss Version
3.1

Threat ID: 6ad3f5472cdf04f65665865b

Added to database: 10/17/2026, 22:23:03 UTC

Last enriched: 10/17/2026, 23:20:50 UTC

Last updated: 10/17/2026, 23:20:50 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses