CVE-2021-41084 Response Splitting from unsanitized headers in http4s

High 8.7 Published Updated

Attackers can perform response splitting by injecting unsanitized user input into HTTP headers or status fields in http4s applications.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-41084?

CVE-2021-41084 is a high-severity vulnerability in http4s, published on 21 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-74, CWE-918

Which versions are affected by CVE-2021-41084?

40 open source packages ship an affected version, including org.http4s:http4s-client_2.12, org.http4s:http4s-client_2.13 and org.http4s:http4s-client_3. It affects 1 product.

PackageAffectedFixed in
org.http4s:http4s-client_2.12 MavenAll versions0.21.29
org.http4s:http4s-client_2.12 MavenAll versions0.21.29
org.http4s:http4s-client_2.12 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_2.12 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_2.12 MavenFrom 0.23.00.23.4
org.http4s:http4s-client_2.12 MavenFrom 0.23.00.23.4
34 more packages
org.http4s:http4s-client_2.13 MavenAll versions0.21.29
org.http4s:http4s-client_2.13 MavenAll versions0.21.29
org.http4s:http4s-client_2.13 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_2.13 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_2.13 MavenFrom 0.23.00.23.4
org.http4s:http4s-client_2.13 MavenFrom 0.23.00.23.4
org.http4s:http4s-client_3 MavenAll versions0.21.29
org.http4s:http4s-client_3 MavenAll versions0.21.29
org.http4s:http4s-client_3 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_3 MavenFrom 0.22.00.22.5
org.http4s:http4s-client_3 MavenFrom 0.23.00.23.4
org.http4s:http4s-client_3 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_2.10 MavenAll versions to 0.21.28None
org.http4s:http4s-server_2.10 MavenAll versions to 0.21.28None
org.http4s:http4s-server_2.11 MavenAll versions to 0.21.28None
org.http4s:http4s-server_2.11 MavenAll versions to 0.21.28None
org.http4s:http4s-server_2.12 MavenAll versions0.21.29
org.http4s:http4s-server_2.12 MavenAll versions0.21.29
org.http4s:http4s-server_2.12 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_2.12 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_2.12 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_2.12 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_2.13 MavenAll versions0.21.29
org.http4s:http4s-server_2.13 MavenAll versions0.21.29
org.http4s:http4s-server_2.13 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_2.13 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_2.13 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_2.13 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_2.13.0-M5 MavenAll versions to 0.21.28None
org.http4s:http4s-server_2.13.0-M5 MavenAll versions to 0.21.28None
org.http4s:http4s-server_3 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_3 MavenFrom 0.22.00.22.5
org.http4s:http4s-server_3 MavenFrom 0.23.00.23.4
org.http4s:http4s-server_3 MavenFrom 0.23.00.23.4

Products include Typelevel Http4s.

How do I fix CVE-2021-41084?

Upgrade org.http4s:http4s-client_2.12 to a fixed version for your release line: 0.21.29, 0.22.5 or 0.23.4.

Is CVE-2021-41084 being exploited?

There is no known exploitation of CVE-2021-41084 in the wild and no public exploit code.

Sources

Also known as GHSA-5vcm-3xc3-w7x3.

Is CVE-2021-41084 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free