# CVE-2026-16729: undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields

- Severity: Medium 4.8 (CVSS:3.1, scored by openjs) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 12% of CVEs (2026-11-30)
- Published: 2026-07-29T16:45:57.001Z
- Modified: 2026-09-10T03:51:14.535Z
- Also known as: GHSA-v3r7-h72x-cjcm
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: openjs

## 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.

(As written by CVE List.)

## Affected

- undici undici: before 6.28.0; from 7.0.0 before 7.29.0; from 8.0.0 before 8.9.0 (not affected: 6.28.0; 7.29.0; 8.9.0)
- undici (npm): before 6.28.0; from 7.0.0 before 7.29.0; from 8.0.0 before 8.9.0
- nodejs undici: before 6.28.0; from 7.0.0 before 7.29.0; from 8.0.0 before 8.9.0

## Every score

- openjs: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm> (vendor-advisory, web)
- <https://cna.openjsf.org/security-advisories.html> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-16729> (advisory)
- <https://github.com/nodejs/undici/commit/10d93fc332f2c8c161982dec3833201de29891b5> (web)
- <https://github.com/nodejs/undici/commit/3bf91ddb493e853957f3a58e155326a668ab8aef> (web)
- <https://github.com/nodejs/undici/commit/af7484043ee075a6f216da0ad77e1dac55199235> (web)
- <https://github.com/nodejs/undici> (package)
- <https://github.com/nodejs/undici/releases/tag/v6.28.0> (web)
- <https://github.com/nodejs/undici/releases/tag/v7.29.0> (web)
- <https://github.com/nodejs/undici/releases/tag/v8.9.0> (web)

## Sources

- CVE List: [CVE-2026-16729](https://www.cve.org/CVERecord?id=CVE-2026-16729), CVE Terms of Use, modified 2026-07-29
- GitHub Advisory Database: [GHSA-v3r7-h72x-cjcm](https://github.com/advisories/GHSA-v3r7-h72x-cjcm), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-16729](https://nvd.nist.gov/vuln/detail/CVE-2026-16729), Public domain, modified 2026-08-05

---

Page: https://cve.day/CVE-2026-16729 · Whole record: https://cve.day/CVE-2026-16729.json · Rebuilt by cve.day 2026-11-25T22:59:30.455Z
