CVE-2026-11525: undici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matching

Published Jun 17, 2026
·
Updated

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.

Other sources

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. For example, SameSite=NoneOfYourBusiness is parsed as None (the most permissive setting), and 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.26.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.

MITRE

undici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matching

Microsoft

Affected Software

11 affected componentsFixes available
npm/undici>=5.15.0<6.0.0, >=6.0.0<6.26.0, >=7.0.0<7.28.0, >=8.0.0<8.5.0
npm/undici>=8.0.0<8.5.0
8.5.0
npm/undici>=7.0.0<7.28.0
7.28.0
npm/undici<6.27.0
6.27.0
Nodejs Undici Node.js<6.27.0
Nodejs Undici Node.js>=7.0.0<7.28.0
Nodejs Undici Node.js>=8.0.0<8.5.0
Microsoft azl3 nodejs 24.17.0-1<24.17.0-2
24.17.0-2
IBM Maximo Application Suite<=9.2
IBM Maximo Application Suite<=9.1
IBM Maximo Application Suite<=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 8.5.0
  2. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 7.28.0
  3. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 6.27.0
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 24.17.0-2
  5. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 6.26.0
  6. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.28.0
  7. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.5.0
  8. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 6.27.0
  9. Configuration

    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; this prevents substring values (e.g., 'NoneOfYourBusiness' → parsed as None; 'StrictLax' → parsed as Lax) from being silently accepted/downgraded.

    undici Set-Cookie SameSite parsing SameSite attribute validation = Strict|Lax|None (exact, case-insensitive)

Event History

Jun 17, 2026
CVE Published
via MITRE·05:31 PM
Data Sourced
via MITRE·05:31 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·07:02 PM
DescriptionSeverityAffected Software
Jun 19, 2026
Advisory Published
via GitHub·02:34 PM
Data Sourced
via GitHub·02:34 PM
DescriptionSeverityWeaknessAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:06 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:06 AM
Affected Software
Updated
via Microsoft·08:06 AM
DescriptionSeverity
Aug 3, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-11525?

The severity of CVE-2026-11525 is rated low, with a score of 3.7.

2

What is the impact of CVE-2026-11525?

CVE-2026-11525 allows undici to interpret non-standard SameSite attribute values as valid, which may lead to unintended cookie behaviors.

3

How does CVE-2026-11525 affect cookie security?

CVE-2026-11525 can undermine cookie security by permitting substring matches for SameSite attributes, leading to potential downgrades in cookie handling.

4

How do I fix CVE-2026-11525?

To fix CVE-2026-11525, ensure that the undici library is updated to a version that correctly implements RFC 6265 for SameSite attribute values.

5

Who is affected by CVE-2026-11525?

Developers using the undici library for HTTP requests in their applications may be affected by CVE-2026-11525.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203