Vulnerabilities in pkg:maven/org.http4s/http4s-async-http-client_2.13

PACKAGE
Advisory Summary

GHSA-8hxh-r6f7-jf45 is a LOW memory exhaustion vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Http4s async http client 2.13 libraries in the Maven ecosystem. The issue involves memory exhaustion in http4s-async-http-client with large or malicious compressed responses. Remediation is available by upgrading affected packages to version 0.21.8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.http4s/http4s-async-http-client_2.13

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.http4s/http4s-async-http-client_2.13. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8hxh-r6f7-jf45 - LOW Memory exhaustion in http4s-async-http-client with large or malicious compressed responses

GHSA-8hxh-r6f7-jf45 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8hxh-r6f7-jf45
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Http4s async http client 2.13
Package Ecosystem Maven
Published Date
Last Updated

How to Fix GHSA-8hxh-r6f7-jf45

To remediate this vulnerability, upgrade all affected Http4s async http client 2.13 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.http4s:http4s-async-http-client_2.13 fixed: 0.21.8
<dependency>
    <groupId>org.http4s</groupId>
    <artifactId>http4s-async-http-client_2.13</artifactId>
    <version>0.21.8</version>
</dependency>
org.http4s:http4s-async-http-client_2.12 fixed: 0.21.8
<dependency>
    <groupId>org.http4s</groupId>
    <artifactId>http4s-async-http-client_2.12</artifactId>
    <version>0.21.8</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.http4s

How to Check if You Are Affected

To determine whether your Java application is affected by GHSA-8hxh-r6f7-jf45, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.http4s

Analyze the terminal output to locate any version of Http4s async http client 2.13 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.http4s command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Http4s async http client 2.13, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://app.snyk.io/vuln/SNYK-JAVA-IONETTY-564897). ### 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: ```scala 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 * https://app.snyk.io/vuln/SNYK-JAVA-IONETTY-564897 * https://github.com/http4s/http4s/issues/3681 ### For more information If you have any questions or comments about this advisory: * Open an issue in [http4s](https://github.com/http4s/http4s/issues/new) * Contact a maintainer privately per [http4s' security policy](https://github.com/http4s/http4s/blob/master/SECURITY.md#reporting-a-vulnerability)

GHSA-8hxh-r6f7-jf45 Affected Http4s async http client 2.13 Versions

2 component(s)
Fixed Versions:
0.21.8
Product / Package Ecosystem Affected Versions Fixed Version
org.http4s:http4s-async-http-client_2.13
Maven
< 0.21.8
0.21.8
org.http4s:http4s-async-http-client_2.12
Maven
< 0.21.8
0.21.8

References

Frequently Asked Questions

What is GHSA-8hxh-r6f7-jf45?
GHSA-8hxh-r6f7-jf45 is a security vulnerability in Http4s async http client 2.13 involving Memory exhaustion in http4s-async-http-client with large or malicious compressed responses under CWE-400: Uncontrolled Resource Consumption.
Which Http4s async http client 2.13 versions are affected?
Affected versions include releases prior to 0.21.8 across affected packages: org.http4s:http4s-async-http-client_2.13, org.http4s:http4s-async-http-client_2.12.
What version fixes GHSA-8hxh-r6f7-jf45?
Upgrading to 0.21.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is http4s-async-http-client_2.13 affected?
Yes, org.http4s:http4s-async-http-client_2.13 is affected in releases prior to 0.21.8. Upgrade your dependency to 0.21.8 or later.
Is http4s-async-http-client_2.12 affected?
Yes, org.http4s:http4s-async-http-client_2.12 is affected in releases prior to 0.21.8. Upgrade your dependency to 0.21.8 or later.
What CWE is associated with GHSA-8hxh-r6f7-jf45?
GHSA-8hxh-r6f7-jf45 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for GHSA-8hxh-r6f7-jf45?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.http4s'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8hxh-r6f7-jf45",
  "modified" : "2021-10-04T21:26:20Z",
  "published" : "2020-10-16T17:03:43Z",
  "aliases" : [ ],
  "summary" : "Memory exhaustion in http4s-async-http-client with large or malicious compressed responses",
  "details" : "### Impact\nA 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](https://app.snyk.io/vuln/SNYK-JAVA-IONETTY-564897).\n\n### Patches\nUpgrade to http4s-async-http-client >= 0.21.8.  All 1.0 milestones are also safe.\n\n### Workarounds\nAdd an explicit runtime dependency on async-http-client's netty dependencies that evicts them to an unaffected version:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"io.netty\" %  \"netty-codec\"         % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-codec-socks\"   % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-handler-proxy\" % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-common\"        % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-transport\"     % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-handler\"       % \"4.1.53.Final\" % Runtime,\n  \"io.netty\" %  \"netty-resolver-dns\"  % \"4.1.53.Final\" % Runtime\n)\n```\n\n### References\n* https://app.snyk.io/vuln/SNYK-JAVA-IONETTY-564897\n* https://github.com/http4s/http4s/issues/3681\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [http4s](https://github.com/http4s/http4s/issues/new)\n* Contact a maintainer privately per [http4s' security policy](https://github.com/http4s/http4s/blob/master/SECURITY.md#reporting-a-vulnerability)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.http4s:http4s-async-http-client_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.21.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.21.7"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.http4s:http4s-async-http-client_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.21.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.21.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/http4s/http4s/security/advisories/GHSA-8hxh-r6f7-jf45"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/http4s/http4s"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-16T17:03:18Z",
    "nvd_published_at" : null
  }
}