Skip to main content
VulnerabilityPublished Updated

CVE-2026-16729: Node undici · undici's setCookie function does not fully sanitize cookie attributes

Affects node-undiciSource GCVE Database

0
Compare

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

CVSS 3.1 base score
6.5Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu 26.10node-undicipkg:deb/ubuntu/node-undici?arch=source&distro=stonkingOther threatsAffected
  • 7.18.2+dfsg+~cs3.2.0-1build1 – 8.9.0+dfsg+~cs3.2.0-1
5 affected builds
Fixed in–
Ubuntu 26.04 LTSnode-undicipkg:deb/ubuntu/node-undici?arch=source&distro=resoluteOther threatsAffected
  • 7.3.0+dfsg1+~cs24.12.11-2 – 7.18.2+dfsg+~cs3.2.0-1build1
4 affected builds
Fixed in–
Ubuntu 24.04 LTSnode-undicipkg:deb/ubuntu/node-undici?arch=source&distro=nobleOther threatsAffected
  • =5.22.1+dfsg1+~cs20.10.10.2-1ubuntu1
  • =5.26.3+dfsg1+~cs23.10.12-2
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

Community reviews

Loading reviews…