Vulnerability · Published Sep 10, 2026 · Assigned by openjs

CVE-2026-88038cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options

Medium 4.8

In plain English

A medium-severity injection in cookies from cookies. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.8Medium
Exploit odds (30 days)0.3%top 83.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

cookies is a Node.js library for reading and writing HTTP cookies, used by Koa via ctx.cookies. In versions before 0.9.2 the library validates the cookie name and value against character sets that reject the semicolon separator, but the domain and path options are checked only against a permissive RFC 7230 field-content matcher that allows semicolons, and both are written into the Set-Cookie header unescaped. An application that passes untrusted or request-derived data into the domain or path option can therefore inject additional cookie attributes, overriding SameSite, Secure, HttpOnly, or Domain on the cookies the application issues. This is a Set-Cookie attribute injection issue (CWE-74). The issue is fixed in cookies 0.9.2, which validates domain and path against RFC 6265 character sets. As a workaround, keep domain and path application-set rather than derived from untrusted input.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-cookiesno fix listedDEBIAN-CVE-2026-88038
Debian:13node-cookiesno fix listedDEBIAN-CVE-2026-88038
Debian:14node-cookies0.9.2+~0.9.2-1DEBIAN-CVE-2026-88038
Ubuntu:22.04:LTSnode-cookiesno fix listedUBUNTU-CVE-2026-88038
Ubuntu:24.04:LTSnode-cookiesno fix listedUBUNTU-CVE-2026-88038
Ubuntu:26.04:LTSnode-cookiesno fix listedUBUNTU-CVE-2026-88038
Ubuntu:26.10node-cookiesno fix listedUBUNTU-CVE-2026-88038

Affected products (as reported)

VendorProductVersions
cookies cookies 0 – before 0.9.2

Weakness: CWE-74 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

References