undici vulnerable to Set-Cookie SameSite attribute downgrade via permissive substring matching
undici
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| undici npm |
|
|
Original description
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).