CVE-2026-88038 cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options
Attackers can inject cookie attributes like SameSite or HttpOnly if applications pass untrusted data to domain or path options, bypassing security controls.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-88038?
CVE-2026-88038 is a medium-severity vulnerability in cookies, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-74
Which versions are affected by CVE-2026-88038?
How do I fix CVE-2026-88038?
Upgrade to a fixed version.
Is CVE-2026-88038 being exploited?
There is no known exploitation of CVE-2026-88038 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2026-88038, GHSA-x44v-5gxf-r6hf, UBUNTU-CVE-2026-88038.