undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields

Summary

CVECVE-2026-16729
StatePUBLISHED
Assigneropenjs
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-29 17:16:51 UTC
Updated2026-07-29 19:16:45 UTC
Descriptionundici'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.

Risk And Classification

Primary CVSS: v3.1 4.8 MEDIUM from ce714d77-add3-4f53-aff5-83d477b104bb

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Problem Types: CWE-74 | CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')


VersionSourceTypeScoreSeverityVector
3.1ce714d77-add3-4f53-aff5-83d477b104bbSecondary4.8MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
3.1CNACVSS4.8MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Undici Undici affected 6.28.0 semver Not specified
CNA Undici Undici unaffected 6.28.0 semver Not specified
CNA Undici Undici affected 7.0.0 7.29.0 semver Not specified
CNA Undici Undici unaffected 7.29.0 semver Not specified
CNA Undici Undici affected 8.0.0 8.9.0 semver Not specified
CNA Undici Undici unaffected 8.9.0 semver Not specified

References

ReferenceSourceLinkTags
github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm ce714d77-add3-4f53-aff5-83d477b104bb github.com
cna.openjsf.org/security-advisories.html ce714d77-add3-4f53-aff5-83d477b104bb cna.openjsf.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Zelys-DFKH (en)

CNA: mcollina (en)

CNA: UlisesGascon (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report