CVE-2026-16729: Node undici · undici's setCookie function does not fully sanitize cookie attributes
Affects node-undiciSource GCVE Database
Not known to be exploited · CVSS 6.5 Medium · fixed in 6.28.0 : update node-undici when convenient.
Data as of 30 Oct 2026, 06:59 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 20% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 6.28.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10node-undicipkg:deb/ubuntu/node-undici?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSnode-undicipkg:deb/ubuntu/node-undici?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSnode-undicipkg:deb/ubuntu/node-undici?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in undici versions 6.28.0, 7.29.0, and 8.9.0. Users should upgrade to one of these patched versions to remediate the vulnerability. As a workaround, sanitize domain values against the RFC 1034 letter-digit-hyphen set before passing them to setCookie, and avoid passing user-controlled data to the unparsed field. These mitigations reduce the risk until upgrading is possible.
Description
undici's setCookie function does not fully sanitize cookie attributes. In undici before 6.28.0, from 7.0.0 up to before 7.29.0, and from 8.0.0 up to before 8.9.0, a domain value is not checked for semicolons and entries in the unparsed array are not sanitized, so attacker-influenced input can inject additional cookie attributes. For example, a domain value containing a semicolon can append attributes such as SameSite, and an unparsed entry can inject attributes such as HttpOnly, without the caller setting them. Applications that pass user-controlled input to these fields, such as multi-tenant or reverse-proxy servers that scope session cookies to a tenant-supplied domain, can have SameSite CSRF protections bypassed, or the Secure, HttpOnly, and SameSite attributes forced, stripped, or overridden. The issue is fixed in undici 6.28.0, 7.29.0, and 8.9.0.
References
- ubuntu.com/security/CVE-2026-16729 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-16729 (opens in a new tab)
- github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-16729 (opens in a new tab)
- github.com/nodejs/undici/commit/10d93fc332f2c8c161982dec3833201de29891b5 (opens in a new tab)
- github.com/nodejs/undici/commit/3bf91ddb493e853957f3a58e155326a668ab8aef (opens in a new tab)
- github.com/nodejs/undici/commit/af7484043ee075a6f216da0ad77e1dac55199235 (opens in a new tab)
- cna.openjsf.org/security-advisories.html (opens in a new tab)
- github.com/nodejs/undici (opens in a new tab)
- github.com/nodejs/undici/releases/tag/v6.28.0 (opens in a new tab)
- github.com/nodejs/undici/releases/tag/v7.29.0 (opens in a new tab)
- github.com/nodejs/undici/releases/tag/v8.9.0 (opens in a new tab)