Node cookies: cookies is a Node.js library for reading and writing HTTP cookies, used by Koa via ctx.cookies. (CVE-2026-88038)
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
Affected software
pkg:deb/ubuntu/node-cookies?arch=source&distro=xenialpkg:deb/ubuntu/node-cookies?arch=source&distro=bionicpkg:deb/ubuntu/node-cookies?arch=source&distro=focalpkg:deb/ubuntu/node-cookies?arch=source&distro=jammypkg:deb/ubuntu/node-cookies?arch=source&distro=noblepkg:deb/ubuntu/node-cookies?arch=source&distro=stonkingpkg:deb/ubuntu/node-cookies?arch=source&distro=resoluteRun 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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.