http4s: Set-Cookie rendering does not escape attribute delimitersGHSA-7qh7-rghh-698h
MEDIUMFix: http4s/http4s@5c8e69aGHSA-7qh7-rghh-698h is a medium-severity (CVSS 4.8) CWE-113 vulnerability in org.http4s:http4s-core_2.12. A fix is available for org.http4s:http4s-core_2.12 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-7qh7-rghh-698h.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.http4s:http4s-core_2.12☕org.http4s:http4s-core_2.13☕org.http4s:http4s-core_3☕org.http4s:http4s-core_2.13☕org.http4s:http4s-core_3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.http4s:http4s-core_2.12 | all versions | 0.23.35org.http4s:http4s-core_2.12:0.23.35 |
| ☕Maven | org.http4s:http4s-core_2.13 | all versions | 0.23.35org.http4s:http4s-core_2.13:0.23.35 |
| ☕Maven | org.http4s:http4s-core_3 | all versions | 0.23.35org.http4s:http4s-core_3:0.23.35 |
| ☕Maven | org.http4s:http4s-core_2.13 | ≥ 1.0.0-M2&&< 1.0.0-M47 | 1.0.0-M47org.http4s:http4s-core_2.13:1.0.0-M47 |
| ☕Maven | org.http4s:http4s-core_3 | ≥ 1.0.0-M2&&< 1.0.0-M47 | 1.0.0-M47org.http4s:http4s-core_3:1.0.0-M47 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.http4s:http4s-core_2.12, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.http4s:http4s-core_2.12 to 0.23.35 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7qh7-rghh-698h is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-7qh7-rghh-698h in your dependencies?
Find it across Maven, including transitive dependencies.