Résumé
http4s: Set-Cookie rendering does not escape attribute delimiters
Détails de l’avis
Summary
ResponseCookie.render writes the cookie name, content, domain, path, and extension fields verbatim, with no sanitization of ; or control characters. An application that places attacker-controlled data into any of these fields lets the attacker inject additional cookie attributes (Domain=, Path=, SameSite=None, etc.) by embedding ; , widening a cookie's scope or downgrading its protections.
Impact
Cookie attribute injection: scope widening (Domain), SameSite downgrade, or overriding security-relevant attributes for applications that render attacker-influenced data in a ResponseCookie field. CR/LF in a field also threatens header splitting on backends that do not strip them.
Preconditions
- Application constructs a
ResponseCookiewith attacker-influencedcontent,name,path,domain, orextension. - The application does not independently validate the value.
Workarounds
Validate cookie field values against the RFC6265 grammar before constructing ResponseCookie, rejecting ; and control characters.
Patch
- Control characters are stripped from
content,name,path,domain, andextension. - Semi-colons are stripped from
content,name,path, anddomain. Becauseextensionis a single value, the semi-colon must be allowed as a delimiter, and sanitizing untrusted values remains the caller's responsibility.
Resources
- RFC6265 §4.1: Set-Cookie syntax
Références
- https://github.com/advisories/GHSA-7qh7-rghh-698h
- https://github.com/http4s/http4s/security/advisories/GHSA-7qh7-rghh-698h
- https://nvd.nist.gov/vuln/detail/CVE-2026-69211
- https://github.com/http4s/http4s/commit/5c8e69ac0f4a2fe03c3481dccd74101cd2e2a890
- https://github.com/http4s/http4s/releases/tag/v0.23.35
- https://github.com/http4s/http4s/releases/tag/v1.0.0-M47
Vulnérabilités liées
Tout Supply chain →- HIGHCVE-2026-105803
Git LFS may execute arbitrary commands via crafted Git LFS configurations
- MEDIUMCVE-2026-63634
pympp allows excessive sponsored transaction fees through padded calldata
- MEDIUMCVE-2026-125109
Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835
- HIGHCVE-2026-96631
AdminNeo has Cookie Attribute Injection via Unsanitized X-Forwarded-Prefix in Set-Cookie Headers
- HIGHCVE-2026-69217
http4s: Ember Server Accepts Duplicate Content-Length Headers
- MEDIUMCVE-2026-69212
http4s: FollowRedirect exposes sensitive headers on same-authority HTTPS-to-HTTP redirects