Memory exhaustion in http4s-async-http-client with large or malicious compressed responsesGHSA-8hxh-r6f7-jf45
GHSA-8hxh-r6f7-jf45 is a security vulnerability in org.http4s:http4s-async-http-client_2.13. A fix is available for org.http4s:http4s-async-http-client_2.13 — see the affected versions and patch details below.
Real-World Exposure
org.http4s:http4s-async-http-client_2.13☕org.http4s:http4s-async-http-client_2.12Real-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
Impact
A server we connect to with http4s-async-http-client could theoretically respond with a large or malicious compressed stream and exhaust memory in the client JVM. It does not affect http4s servers, other client backends, or clients that speak only to trusted servers. This is related to a transitive dependency on netty-codec-4.1.45.Final, which is affected by CVE-2020-11612.
Patches
Upgrade to http4s-async-http-client >= 0.21.8. All 1.0 milestones are also safe.
Workarounds
Add an explicit runtime dependency on async-http-client's netty dependencies that evicts them to an unaffected version:
libraryDependencies ++= Seq(
"io.netty" % "netty-codec" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-codec-socks" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-handler-proxy" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-common" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-transport" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-handler" % "4.1.53.Final" % Runtime,
"io.netty" % "netty-resolver-dns" % "4.1.53.Final" % Runtime
)
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in http4s
- Contact a maintainer privately per http4s' security policy
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.http4s:http4s-async-http-client_2.13 | all versions | 0.21.8org.http4s:http4s-async-http-client_2.13:0.21.8 |
| ☕Maven | org.http4s:http4s-async-http-client_2.12 | all versions | 0.21.8org.http4s:http4s-async-http-client_2.12:0.21.8 |
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-async-http-client_2.13, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.http4s:http4s-async-http-client_2.13 to 0.21.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8hxh-r6f7-jf45 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-8hxh-r6f7-jf45 in your dependencies?
Find it across Maven, including transitive dependencies.