# 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.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Sep 2026
- **Updated:** 10 Sep 2026
- **Also known as:** DEBIAN-CVE-2026-88038, GHSA-x44v-5gxf-r6hf, UBUNTU-CVE-2026-88038

## 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 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## 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.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-88038 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-88038 in the wild and no public exploit code.

Affected product: cookies. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-88038/ (Markdown: https://insights.sbomify.com/CVE-2026-88038/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-88038
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-88038
- OSV: https://osv.dev/vulnerability/CVE-2026-88038

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-88038/
Summaries are generated and may contain mistakes; the official description above is the record.
