CVE-2021-41084Response Splitting from unsanitized headers in http4s
http4s is an open source scala interface for HTTP. In affected versions http4s is vulnerable to response-splitting or request-splitting attacks when untrusted user input is used to create any of the following fields: Header names (`Header.name`å), Header values (`Header.value`), Status reason phrases (`Status.reason`), URI paths (`Uri.Path`), URI authority registered names (`URI.RegName`) (through 0.21). This issue has been resolved in versions 0.21.30, 0.22.5, 0.23.4, and 1.0.0-M27 perform the following. As a matter of practice http4s services and client applications should sanitize any user input in the aforementioned fields before returning a request or response to the backend. The carriage return, newline, and null characters are the most threatening.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Maven has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.http4s:http4s-client_2.12 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
| Maven library | org.http4s:http4s-client_2.13 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
| Maven library | org.http4s:http4s-client_3 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
| Maven library | org.http4s:http4s-server_2.10 | Fix pending | GHSA-5vcm-3xc3-w7x3 | |
| Maven library | org.http4s:http4s-server_2.11 | Fix pending | GHSA-5vcm-3xc3-w7x3 | |
| Maven library | org.http4s:http4s-server_2.12 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
| Maven library | org.http4s:http4s-server_2.13 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
| Maven library | org.http4s:http4s-server_2.13.0-m5 | Fix pending | GHSA-5vcm-3xc3-w7x3 | |
| Maven library | org.http4s:http4s-server_3 | Fixed | 0.23.4 | GHSA-5vcm-3xc3-w7x3 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- http4s: affected: <= 0.21.28, >= 0.22.0, < 0.22.5, >= 0.23.0, < 0.23.4, >= 1.0.0-M1, < 1.0.0-M27
References
- https://github.com/http4s/http4s/security/advisories/GHSA-5vcm-3xc3-w7x3
- https://github.com/http4s/http4s/commit/d02007db1da4f8f3df2dbf11f1db9ac7afc3f9d8
- https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html#fields.values
- https://owasp.org/www-community/attacks/HTTP_Response_Splitting
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.