---
id: CVE-2026-88038
title: >-
  cookies is a Node.js library for reading and writing HTTP cookies, used by Koa
  via ctx.cookies
summary: >-
  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 …
severity: medium
cvss: 4.8
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'
cwe:
  - CWE-74
vendor: cookies
product: cookies
affected:
  - cookies < 0.9.2
published: '2026-09-10'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T19:57:48.533'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-88038'
references:
  - url: 'https://cna.openjsf.org/security-advisories.html'
    label: ce714d77-add3-4f53-aff5-83d477b104bb
  - url: >-
      https://github.com/pillarjs/cookies/security/advisories/GHSA-x44v-5gxf-r6hf
    label: ce714d77-add3-4f53-aff5-83d477b104bb
tags:
  - nvd
  - cve.org
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-09-10T12:40:21.304200Z'
ingestedAt: '2026-09-10T12:48:46.274Z'
epss: 0.00253
epssPercentile: 0.14958
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
