CVE-2026-88038
published medium CVSS 3.1 · 4.8cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| cookies | — | cookies0 to < 0.9.2 (affected · semver) · 0.9.2 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | openjs |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.8 / 10
- Severity
- medium
- Provider
- openjs · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| cookies | cookies | 0 to < 0.9.2 (affected · semver)0.9.2 (unaffected · semver)Default: unaffected | openjs · cna |
Weaknesses
1- CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
References
2Provider assertions
2openjs · cna
cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 718819a743d66c9f78c901817be3168ee893f4812664db9247780feb535f8719
- Ingested
- 23 Sep 2026, 09:37:53 UTC
- Source record
- Official CVE record