Vulnerabilities in pkg:maven/org.http4s/blaze-core_2.13
PACKAGECVE-2021-21293 is a HIGH (CVSS 7.5) unbounded connection acceptance leads to vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Blaze core 2.11 libraries in the Maven ecosystem. The issue involves unbounded connection acceptance leads to file handle exhaustion. Remediation is available by upgrading affected packages to version 0.14.15.
pkg:maven/org.http4s/blaze-core_2.13
Vulnerability advisories affecting package pkg:maven/org.http4s/blaze-core_2.13. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xmw9-q7x9-j5qc | CVE-2021-21293 | HIGH | Unbounded connection acceptance leads to file handle exhaustion |
CVE-2021-21293 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-21293
To remediate this vulnerability, upgrade all affected Blaze core 2.11 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.http4s</groupId>
<artifactId>blaze-core_2.11</artifactId>
<version>0.14.15</version>
</dependency>
<dependency>
<groupId>org.http4s</groupId>
<artifactId>blaze-core_2.12</artifactId>
<version>0.14.15</version>
</dependency>
<dependency>
<groupId>org.http4s</groupId>
<artifactId>blaze-core_2.13</artifactId>
<version>0.14.15</version>
</dependency>
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 CVE-2021-21293, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.http4s
Analyze the terminal output to locate any version of Blaze core 2.11 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.15), 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 Blaze core 2.11, 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
CVE-2021-21293 Affected Blaze core 2.11 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.http4s:blaze-core_2.11
|
Maven |
< 0.14.15
|
0.14.15
|
|
org.http4s:blaze-core_2.12
|
Maven |
< 0.14.15
|
0.14.15
|
|
org.http4s:blaze-core_2.13
|
Maven |
< 0.14.15
|
0.14.15
|
References
Frequently Asked Questions
What is CVE-2021-21293?
Which Blaze core 2.11 versions are affected?
What version fixes CVE-2021-21293?
Is blaze-core_2.11 affected?
Is blaze-core_2.12 affected?
What is the CVSS score of CVE-2021-21293?
What CWE is associated with CVE-2021-21293?
How can I check Maven dependencies for CVE-2021-21293?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xmw9-q7x9-j5qc",
"modified" : "2022-10-25T20:21:46Z",
"published" : "2021-02-02T21:42:49Z",
"aliases" : [ "CVE-2021-21293" ],
"summary" : "Unbounded connection acceptance leads to file handle exhaustion",
"details" : "### Impact\n\nAll servers running blaze-core <= 0.14.14, including blaze-http and http4s-blaze-server users, are affected.\n\nBlaze, accepts connections unconditionally on a dedicated thread pool. This has the net effect of amplifying degradation in services that are unable to handle their current request load, since incoming connections are still accepted and added to an unbounded queue. Each connection allocates a socket handle, which drains a scarce OS resource. This can also confound higher level circuit breakers which work based on detecting failed connections.\n\nThe vast majority of affected users are using it as part of http4s-blaze-server <= 0.21.16. http4s provides a mechanism for limiting open connections, but is enforced inside the Blaze accept loop, after the connection is accepted and the socket opened. Thus, the limit only prevents the number of connections which can be simultaneously processed, not the number of connections which can be held open.\n\n### Patches\n\nThe issue is fixed in version 0.14.15 for `NIO1SocketServerGroup`. A `maxConnections` parameter is added, with a default value of 512. Concurrent connections beyond this limit are rejected. To run unbounded, which is not recommended, set a negative number.\n\nThe `NIO2SocketServerGroup` has no such setting and is now deprecated.\n\n### Workarounds\n* An Nginx side-car acting as a reverse proxy for the local http4s-blaze-server instance would be able to apply a connection limiting semantic before the sockets reach blaze-core. Nginx’s connection bounding is both asynchronous and properly respects backpressure.\n* A similar sidecar strategy is viable for other non-HTTP services running on blaze-core.\n* http4s-ember-server is an alternative to http4s-blaze-server, but does not yet have HTTP/2 or web socket support. Its performance in terms of RPS is appreciably behind Blaze’s, and as the newest backend, has substantially less industrial uptake.\n* http4s-jetty is an alternative to http4s-blaze-server, but does not yet have web socket support. Its performance in terms of requests per second is somewhat behind Blaze’s, and despite Jetty's industrial adoption, the http4s integration has substantially less industrial uptake.\n* http4s-tomcat is an alternative to http4s-blaze-server, but does not yet have HTTP/2 web socket support. Its performance in terms of requests per second is somewhat behind Blaze’s, and despite Jetty's industrial adoption, the http4s integration has substantially less industrial uptake.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [http4s/blaze](http://github.com/http4s/blaze)\n* Contact us according to the [http4s security policy](https://github.com/http4s/http4s/security/policy)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.http4s:blaze-core_2.11"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.http4s:blaze-core_2.12"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.http4s:blaze-core_2.13"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.15"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/http4s/blaze/security/advisories/GHSA-xmw9-q7x9-j5qc"
}, {
"type" : "WEB",
"url" : "https://github.com/http4s/http4s/security/advisories/GHSA-xhv5-w9c5-2r2w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21293"
}, {
"type" : "WEB",
"url" : "https://github.com/http4s/blaze/commit/4f786177f9fb71ab272f3a5f6c80bca3e5662aa1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-02-02T21:40:18Z",
"nvd_published_at" : "2021-02-02T22:15:00Z"
}
}