Medium

Effect: Cookie attribute injection via domain, path, and name fields in @effect/platform makeCookie()

  • Disclosed: 10.11.2026
  • Updated: 10.11.2026 18:17

Impact

The name, domain, and path fields of makeCookie() were validated with a regex that allows ;, the attribute separator in Set-Cookie headers. Because serializeCookie() writes those fields verbatim, a caller who passes untrusted input into any of them can append arbitrary attributes to the header.

For example, a domain of "legit.com; Domain=.parent.tld" serializes to session=token; Domain=legit.com; Domain=.parent.tld. RFC 6265 §5.3 takes the last occurrence, so the injected domain wins and the cookie widens to the parent domain. The same trick sets SameSite=None or Max-Age when the caller has not set those options itself.

The value field is unaffected: it passes through encodeURIComponent, which encodes ;. CR and LF are rejected by the existing regex, so header splitting is not possible.

Patches

Fixed in #6763 (v4) and #6765 (v3): the shared regex is split into per-field validators that reject ;, and serializeCookie() now validates before writing the header.

Workarounds

Do not pass user input into name, domain, or path; set them from application constants.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package effect >= 4.0.0-beta.0, < 4.0.0-beta.103 4.0.0-beta.103
npm package @effect/platform >= 0.1.0, < 0.97.1 0.97.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Weakness (CWE)
CWE-20, CWE-74
Platform
npm
Package
effect, @effect/platform
Disclosed
10.11.2026
Updated
10.11.2026 18:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-chp3-j5qr-2vfr - CC BY 4.0

Vulnerability history: effect

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
03.2026 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2
  • Medium 1

Disclosures per year

  1. 2026: 3
  1. High CVE-2026-121707 < 3.22.1 3.22.1
  2. Effect: Cookie attribute injection via domain, path, and name fields in @effect/platform makeCookie() this entry
    Medium CVE-2026-115779 >= 4.0.0-beta.0, < 4.0.0-beta.103 4.0.0-beta.103

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.