CVE-2026-11525: Undici Undici Vulnerable To Set-Cookie SameSite Vulnerability

LOW
Advisory Identifier: GHSA-g8m3-5g58-fq7m
CVSS 3.7
CWE-183
Published
Advisory Summary

CVE-2026-11525 is a LOW (CVSS 3.7) undici vulnerable to set-cookie samesite vulnerability (CWE-183: Permissive List of Allowed Inputs) affecting Undici libraries in the npm ecosystem. The issue involves undici vulnerable to set-cookie samesite attribute downgrade via permissive substring matching. Remediation is available by upgrading affected packages to version 6.27.0, 7.28.0, 8.5.0.

CVE-2026-11525 at a Glance

CVE Identifier CVE-2026-11525
GHSA Identifier GHSA-g8m3-5g58-fq7m
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-183: Permissive List of Allowed Inputs
Affected Product Undici
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-11525

To remediate this vulnerability, upgrade all affected Undici dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

undici fixed: 6.27.0
npm install undici@6.27.0
undici fixed: 7.28.0
npm install undici@7.28.0
undici fixed: 8.5.0
npm install undici@8.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls undici

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-11525, inspect your project dependencies using npm:

npm ls undici

Analyze the terminal output to locate any version of Undici in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.27.0), your application is affected.

Note: The npm ls undici command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-183: Permissive List of Allowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses. In Undici, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact When undici parses a `Set-Cookie` header, it accepts any `SameSite` attribute value that contains `Strict`, `Lax`, or `None` as a substring, rather than the case-insensitive exact match specified by RFC 6265. Non-spec values are silently mapped to one of the three standard tokens: - `SameSite=NoneOfYourBusiness` is parsed as `None`, the most permissive setting. - `SameSite=StrictLax` is parsed as `Lax`, a downgrade from `Strict`. Affected applications are those that consume `Set-Cookie` headers from server responses (for example via undici's `fetch` or proxy code paths) and then forward or rely on the parsed `sameSite` attribute. A malicious or non-compliant server can coerce the consumer's view of a cookie's SameSite policy to a weaker value, silently degrading the SameSite enforcement the cookie is supposed to provide. This was introduced in undici 5.15.0 when the cookies feature was added. ## Patches Upgrade to undici v6.27.0, v7.28.0 or v8.5.0. ## Workarounds After parsing a `Set-Cookie` header, validate that the resulting `sameSite` attribute is one of `'Strict'`, `'Lax'`, or `'None'` (exact, case-insensitive) before forwarding or relying on it.

CVE-2026-11525 Affected Undici Versions

3 component(s)
Fixed Versions:
6.27.07.28.08.5.0
Product / Package Ecosystem Affected Versions Fixed Version
undici
npm
< 6.27.0
6.27.0
undici
npm
≥ 7.0.0
< 7.28.0
7.28.0
undici
npm
≥ 8.0.0
< 8.5.0
8.5.0

References

Frequently Asked Questions

What is CVE-2026-11525?
CVE-2026-11525 is a security vulnerability in Undici involving undici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matching under CWE-183: Permissive List of Allowed Inputs.
Which Undici versions are affected?
Affected versions include releases prior to 6.27.0, 7.28.0, 8.5.0 across affected packages: undici.
What version fixes CVE-2026-11525?
Upgrading to 6.27.0, 7.28.0, 8.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is undici affected?
Yes, undici is affected in releases prior to 6.27.0, 7.28.0, 8.5.0. Upgrade your dependency to 6.27.0, 7.28.0, 8.5.0 or later.
What is the CVSS score of CVE-2026-11525?
CVE-2026-11525 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-11525?
CVE-2026-11525 is classified under CWE-183: Permissive List of Allowed Inputs (The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.).
How can I check npm dependencies for CVE-2026-11525?
Run the dependency tree command: 'npm ls undici'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g8m3-5g58-fq7m",
  "modified" : "2026-06-19T14:34:46Z",
  "published" : "2026-06-19T14:34:46Z",
  "aliases" : [ "CVE-2026-11525" ],
  "summary" : "undici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matching",
  "details" : "## Impact\n\nWhen undici parses a `Set-Cookie` header, it accepts any `SameSite` attribute value that contains `Strict`, `Lax`, or `None` as a substring, rather than the case-insensitive exact match specified by RFC 6265. Non-spec values are silently mapped to one of the three standard tokens:\n\n- `SameSite=NoneOfYourBusiness` is parsed as `None`, the most permissive setting.\n- `SameSite=StrictLax` is parsed as `Lax`, a downgrade from `Strict`.\n\nAffected applications are those that consume `Set-Cookie` headers from server responses (for example via undici's `fetch` or proxy code paths) and then forward or rely on the parsed `sameSite` attribute. A malicious or non-compliant server can coerce the consumer's view of a cookie's SameSite policy to a weaker value, silently degrading the SameSite enforcement the cookie is supposed to provide.\n\nThis was introduced in undici 5.15.0 when the cookies feature was added.\n\n## Patches\n\nUpgrade to undici v6.27.0, v7.28.0 or v8.5.0.\n\n## Workarounds\n\nAfter parsing a `Set-Cookie` header, validate that the resulting `sameSite` attribute is one of `'Strict'`, `'Lax'`, or `'None'` (exact, case-insensitive) before forwarding or relying on it.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.27.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.28.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/security/advisories/GHSA-g8m3-5g58-fq7m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-11525"
  }, {
    "type" : "WEB",
    "url" : "https://cna.openjsf.org/security-advisories.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodejs/undici"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-183" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T14:34:46Z",
    "nvd_published_at" : "2026-06-17T18:17:35Z"
  }
}