<Vulnerability name="CVE-2026-16729">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-07-29T16:45:57</PublicDate>
    <Bugzilla id="2508506" url="https://bugzilla.redhat.com/show_bug.cgi?id=2508506" xml:lang="en:us">
undici: Undici: Cookie attribute injection allows bypassing security protections
    </Bugzilla>
    <CVSS3 status="verified">
        <CVSS3BaseScore>4.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-140</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in undici, where its `setCookie` function does not fully sanitize cookie attributes. A remote attacker could exploit this by providing specially crafted input to the `domain` or `unparsed` fields, leading to the injection of additional cookie attributes. This vulnerability can allow an attacker to bypass Cross-Site Request Forgery (CSRF) protections or manipulate critical cookie attributes like `Secure` and `HttpOnly`, potentially compromising user sessions or data integrity in applications such as multi-tenant or reverse-proxy servers.
    </Details>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48273">RHSA-2026:48273</Advisory>
        <Package name="nodejs26-main">nodejs26-main-26.5.1-1.5.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-30T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48537">RHSA-2026:48537</Advisory>
        <Package name="nodejs24-main">nodejs24-main-24.18.1-0.1.hum1</Package>
    </AffectedRelease>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>grafana12.4</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>jaeger</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Will not fix</FixState>
        <PackageName>nodejs25</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>prometheus3.13</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rust</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-16729
https://nvd.nist.gov/vuln/detail/CVE-2026-16729
https://cna.openjsf.org/security-advisories.html
https://github.com/nodejs/undici/security/advisories/GHSA-v3r7-h72x-cjcm
    </References>
</Vulnerability>