
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-16729 is a cookie attribute injection vulnerability in the undici Node.js HTTP client library, specifically in its setCookie function. The flaw allows attacker-influenced input to inject additional cookie attributes by exploiting insufficient sanitization of the domain value and entries in the unparsed array. Affected versions include undici before 6.28.0, 7.0.0 up to before 7.29.0, and 8.0.0 up to before 8.9.0. It was disclosed on July 29, 2026, with a CVSS v3.1 base score of 4.8 (Medium) (GitHub Advisory).
The vulnerability is classified as CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component — Injection). There are two distinct injection paths: first, validateCookieDomain does not reject semicolons (unlike validateCookiePath, which already blocks 0x3B), so a domain value such as example.com; SameSite=None is passed verbatim, appending unintended cookie attributes. Second, the unparsed array loop only verifies that each entry contains an = sign but does not sanitize values, meaning an entry like X-Custom=val; HttpOnly injects HttpOnly without the caller explicitly setting cookie.httpOnly = true. Exploitation requires that the application passes user-controlled input to the domain or unparsed fields of setCookie, a pattern common in multi-tenant or reverse-proxy architectures (GitHub Advisory).
Successful exploitation can allow an attacker to bypass SameSite CSRF protections, or force, strip, or override the Secure, HttpOnly, and SameSite cookie attributes without the application's knowledge. In multi-tenant or reverse-proxy deployments where session cookies are scoped to a tenant-supplied domain, this could enable cross-site request forgery attacks or weaken cookie security posture, potentially exposing session tokens. Availability is not impacted, but both confidentiality and integrity are partially affected (GitHub Advisory).
setCookie function's domain field or unparsed array.attacker.com; SameSite=None, to inject the SameSite=None attribute into the resulting Set-Cookie header without the application explicitly setting it.unparsed array such as X-Custom=val; HttpOnly to inject the HttpOnly attribute, or X-Custom=val; Secure=false to strip the Secure flag.Set-Cookie header with injected attributes delivered to the victim's browser.SameSite=None enables cross-site requests) or to access cookies that should have been HttpOnly-protected, depending on the injected attribute (GitHub Advisory).Set-Cookie headers with unexpected or duplicate cookie attributes (e.g., SameSite=None appearing without application intent, or HttpOnly present when not configured by the application).Secure or HttpOnly flags, or exhibiting unexpected SameSite values inconsistent with application configuration.Upgrade undici to the patched versions: 6.28.0, 7.29.0, or 8.9.0, depending on the version branch in use. As a workaround for applications that cannot immediately upgrade, sanitize domain values against the RFC 1034 letter-digit-hyphen character set before passing them to setCookie, and avoid passing any user-controlled data to the unparsed field entirely (GitHub Advisory).
The advisory was published by mcollina (a core Node.js maintainer) on July 29, 2026, with remediation review credited to UlisesGascon. The vulnerability was assigned a "Moderate" severity rating by the undici project. No significant broader media coverage or notable community commentary beyond the official advisory has been identified at this time (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."