http4s: Set-Cookie rendering does not escape attribute delimiters
- CVE-2026-69211
- GHSA-7qh7-rghh-698h
- EUVD-2026-79175
Description
Show the whole descriptionHide the whole description
## 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 `ResponseCookie` with attacker-influenced `content`, `name`, `path`, `domain`, or `extension`. - 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`, and `extension`. - Semi-colons are stripped from `content`, `name`, `path`, and `domain`. Because `extension` is 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](https://www.rfc-editor.org/info/rfc6265/#section-4.1.1): Set-Cookie syntax
Text from the GitHub Advisory record.
Recommendation
http4s
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikely
- If you run a version before 0.23.35update to 0.23.35 or later
org.http4s:http4s-core_2.12
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-core_2.12 0.23.35 on its registry (opens in a new tab)
org.http4s:http4s-core_2.13
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikelyorg.http4s:http4s-core_2.13 1.0.0-M47 on its registry (opens in a new tab)
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-core_2.13 0.23.35 on its registry (opens in a new tab)
org.http4s:http4s-core_3
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikelyorg.http4s:http4s-core_3 1.0.0-M47 on its registry (opens in a new tab)
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-core_3 0.23.35 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
http4s
Affected versions Fixed in from 1.0.0-M1 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35 org.http4s:http4s-core_2.12Maven
Affected versions Fixed in before 0.23.35 0.23.35 org.http4s:http4s-core_2.13Maven
Affected versions Fixed in from 1.0.0-M2 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35 org.http4s:http4s-core_3Maven
Affected versions Fixed in from 1.0.0-M2 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35
Product versions from the ENISA EUVD record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.