{"id":"CVE-2026-16729","published":"2026-07-29T16:45:57Z","modified":"2026-07-29T18:08:16Z","title":"undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields","vendor":"undici","product":"undici","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00278,"percentile":0.20756,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm","tags":[]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":[]}],"priority":{"score":7.5,"factors":[{"name":"EPSS percentile","points":4.15},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"undici","affectedVersions":[{"vendor":"undici","product":"undici","versions":["< 6.28.0",">= 7.0.0, < 7.29.0",">= 8.0.0, < 8.9.0"]}],"fixedVersions":[{"vendor":"undici","product":"undici","versions":["6.28.0","7.29.0","8.9.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-29T18:08:05.310961Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"undici","vulnerableRanges":["<6.28.0",">=7.0.0, <7.29.0",">=8.0.0, <8.9.0"],"patched":["6.28.0","7.29.0","8.9.0"],"from":["GHSA-v3r7-h72x-cjcm"],"provenance":"source"}],"summary":{"text":"The undici HTTP client library's setCookie function fails to sanitize cookie attributes, so the domain value is not checked for semicolons and entries in the unparsed array are not passed through sanitization. An attacker who can influence input to these fields in undici versions before 6.28.0, from 7.0.0 before 7.29.0, and from 8.0.0 before 8.9.0 can inject additional cookie attributes such as SameSite or HttpOnly, but only in applications that pass user-controlled input to these fields, such as multi-tenant or reverse-proxy servers that scope cookies to a tenant-supplied domain.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:10Z"},"euvd":{"id":"EUVD-2026-50416","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-14643","published":"2026-07-29","fixed":"8.9.0","kev":false},{"cve":"CVE-2026-15157","published":"2026-07-29","fixed":"8.9.0","kev":false},{"cve":"CVE-2026-16728","published":"2026-07-29","fixed":"8.9.0","kev":false},{"cve":"CVE-2026-16729","published":"2026-07-29","fixed":"8.9.0","kev":false},{"cve":"CVE-2026-18149","published":"2026-09-04","fixed":"8.10.2","kev":false},{"cve":"CVE-2026-18540","published":"2026-09-04","fixed":"8.10.2","kev":false,"link":{"from":"CVE-2026-16729","to":"CVE-2026-18540","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"6.28.0","toFixed":"6.28.1","daysApart":37}]}},{"cve":"CVE-2026-19534","published":"2026-09-04","fixed":"8.10.2","kev":false,"link":{"from":"CVE-2026-16729","to":"CVE-2026-19534","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"6.28.0","toFixed":"6.28.1","daysApart":37}]}},{"cve":"CVE-2026-85024","published":"2026-09-04","fixed":"8.10.2","kev":false,"link":{"from":"CVE-2026-16729","to":"CVE-2026-85024","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"6.28.0","toFixed":"6.28.1","daysApart":37}]}}],"package":"npm:undici"}}