What’s Vulnerable › Vulnerabilities
CVE-2026-88038: cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options
- Severity: medium (CVSS 4.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-09-10 · updated 2026-09-10
- Weakness: CWE-74
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 products
- cookies: before 0.9.2 — fixed in 0.9.2
How to fix
Upgrade to a fixed version: cookies 0.9.2. Check the vendor advisory for mitigations.
References
- https://cna.openjsf.org/security-advisories.html
- https://github.com/pillarjs/cookies/security/advisories/GHSA-x44v-5gxf-r6hf
Get alerted when CVE-2026-88038 or the next vulnerability affects your stack