http4s: Set-Cookie rendering does not escape attribute delimiters
Package Affected versions Patched versions Description Summary ResponseCookie.render writes the cookie name, content, domain, path, and extension fields verbatim, with no sanitization of ; or control
Package
org.http4s:http4s-core_2.12 (Maven)Affected versions
< 0.23.35Patched versions
0.23.35 org.http4s:http4s-core_2.13 (Maven) < 0.23.35 >= 1.0.0-M2, < 1.0.0-M47 0.23.35 1.0.0-M47 org.http4s:http4s-core_3 (Maven) < 0.23.35 >= 1.0.0-M2, < 1.0.0-M47 0.23.35 1.0.0-M47Description
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
References
- GHSA-7qh7-rghh-698h
- https://nvd.nist.gov/vuln/detail/CVE-2026-69211
- http4s/http4s@5c8e69a
- https://github.com/http4s/http4s/releases/tag/v0.23.35
- https://github.com/http4s/http4s/releases/tag/v1.0.0-M47
Severity
Moderate CVSS overall score This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS). / 10CVSS v3 base metrics
Attack vector Network Attack complexity High Privileges required None User interaction None Scope Unchanged Confidentiality Low Integrity Low Availability None CVSS v3 base metrics Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability. Attack complexity: More severe for the least complex attacks. Privileges required: More severe if no privileges are required. User interaction: More severe when no user interaction is required. Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope. Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user. Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user. Availability: More severe when the loss of impacted component availability is highest. CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NEPSS score
Exploit Prediction Scoring System (EPSS) This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST. (18th percentile)Weaknesses
Weakness CWE-113Improper Neutralization of CRLF Sequences in HTTP Headers
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers. Learn more on MITRE. Weakness CWE-1286Improper Validation of Syntactic Correctness of Input
The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax. Learn more on MITRE.CVE ID
CVE-2026-69211GHSA ID
GHSA-7qh7-rghh-698hSource code
http4s/http4sCredits
-
rossabaker Analyst
-
morgen-peschke Remediation reviewer
Uh oh!
There was an error while loading. Please reload this page.
See something to contribute? Suggest improvements for this vulnerability.