{"id":"CVE-2026-16729","state":"PUBLISHED","title":"undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields","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.","publishedAt":"2026-07-29T16:45:57.001Z","updatedAt":"2026-07-29T18:08:16.149Z","severity":{"score":4.8,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","source":"openjs"},"assigner":"openjs","products":["undici undici"],"affected":[{"vendor":"undici","product":"undici","packageURL":"pkg:npm/undici","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"6.28.0","versionType":"semver"},{"version":"6.28.0","status":"unaffected","versionType":"semver"},{"version":"7.0.0","status":"affected","lessThan":"7.29.0","versionType":"semver"},{"version":"7.29.0","status":"unaffected","versionType":"semver"},{"version":"8.0.0","status":"affected","lessThan":"8.9.0","versionType":"semver"},{"version":"8.9.0","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm","https://cna.openjsf.org/security-advisories.html"],"weaknesses":["CWE-74"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/16xxx/CVE-2026-16729.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-16729","state":"PUBLISHED","datePublished":"2026-07-29T16:45:57.001Z","dateUpdated":"2026-07-29T18:08:16.149Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-07-23T05:44:24.720Z"},"containers":{"cna":{"title":"undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"undici","product":"undici","packageURL":"pkg:npm/undici","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"6.28.0","versionType":"semver"},{"version":"6.28.0","status":"unaffected","versionType":"semver"},{"version":"7.0.0","status":"affected","lessThan":"7.29.0","versionType":"semver"},{"version":"7.29.0","status":"unaffected","versionType":"semver"},{"version":"8.0.0","status":"affected","lessThan":"8.9.0","versionType":"semver"},{"version":"8.9.0","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"metrics":[{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","baseScore":4.8,"baseSeverity":"MEDIUM"},"scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-74","lang":"en","description":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-07-29T16:45:57.001Z"},"credits":[{"lang":"en","type":"reporter","value":"Zelys-DFKH"},{"lang":"en","type":"remediation reviewer","value":"mcollina"},{"lang":"en","type":"remediation reviewer","value":"UlisesGascon"}],"x_generator":{"engine":"cve-kit 1.0.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-29T18:08:05.310961Z","id":"CVE-2026-16729","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-29T18:08:16.149Z"}}]}}}