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.
Published: 2026-09-10
Score: 4.8 Medium
EPSS: n/a
KEV: No
Impact: Set-Cookie attribute injection
Action: Patch
AI Analysis

Impact

Cookies is a Node.js library for reading and writing HTTP cookies. In versions earlier than 0.9.2 the library checks the cookie name and value for illegal characters, but it only applies a permissive field-content matcher to the domain and path options, which permits semicolons. These options are then written directly into the Set-Cookie header without escaping. If an application supplies untrusted or request-derived data to the domain or path parameters, an attacker can inject additional cookie attributes, overriding SameSite, Secure, HttpOnly, or Domain settings on cookies the application issues. The flaw is a Set-Cookie attribute injection vulnerability (CWE‑74).

Affected Systems

The impact is limited to applications that use the "cookies" library, including projects such as Koa that consume the library via ctx.cookies. Any deployment of cookies prior to version 0.9.2 is affected; upgrades to 0.9.2 or later include the fix. No other vendors or products are referenced in the advisory.

Risk and Exploitability

The vulnerability has a CVSS score of 4.8, indicating moderate risk. The EPSS score is not available, but the flaw is not listed in CISA’s KEV catalog, suggesting no currently known exploitation in the wild. However, because the flaw allows manipulation of cookie attributes, an attacker who can control the domain or path options could undermine cookie security, potentially facilitating session fixation or other credential theft attacks. An application that accepts user input for these options is the primary attack vector; thus, the risk is highest in scenarios where domain or path values are derived from request data or external inputs.

Generated by OpenCVE AI on September 10, 2026 at 13:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the cookies library to version 0.9.2 or newer, which validates domain and path options against RFC 6265 character sets.
  • Ensure that the domain and path options are set to trusted, static values and are not derived from untrusted input; if unavoidable, validate and escape semicolons according to RFC 6265 before assigning them.
  • Audit the application’s cookie handling to confirm that no additional attributes are injected into the Set‑Cookie header and test that cookie security flags are correctly enforced.

Generated by OpenCVE AI on September 10, 2026 at 13:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 10 Sep 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 10 Sep 2026 12:30:00 +0000

Type Values Removed Values Added
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.
Title cookies vulnerable to Set-Cookie attribute injection via unvalidated domain and path options
Weaknesses CWE-74
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-09-10T12:40:30.423Z

Reserved: 2026-09-09T19:59:25.787Z

Link: CVE-2026-88038

cve-icon Vulnrichment

Updated: 2026-09-10T12:40:26.755Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-10T13:20:33.053

Modified: 2026-09-10T19:57:48.533

Link: CVE-2026-88038

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-10T13:30:12Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')