Security advisory
Http4s (http4s-blaze-server) is a minimal, idiomatic Scala interface for HTTP services. Http4s before versions 0.21.17, 0.22.0-M2, and 1.0.0-M14 have a vulnerability which can lead to a denial-of-service. Blaze-core, a library underlying http4s-blaze-server, accepts connections unboundedly on its selector 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. http4s provides a general "MaxActiveRequests" middleware mechanism for limiting open connections, but it 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. In 0.21.17, 0.22.0-M2, and 1.0.0-M14, a new "maxConnections" property, with a default value of 1024, has been added to the `BlazeServerBuilder`. Setting the value to a negative number restores unbounded behavior, but is strongly disrecommended. The NIO2 backend does not respect `maxConnections`. Its use is now deprecated in http4s-0.21, and the option is removed altogether starting in http4s-0.22. There are several possible workarounds described in the re
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-21294
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:32 UTC · Revision 1
Source evidence
Http4s (http4s-blaze-server) is a minimal, idiomatic Scala interface for HTTP services. Http4s before versions 0.21.17, 0.22.0-M2, and 1.0.0-M14 have a vulnerability which can lead to a denial-of-service. Blaze-core, a library underlying http4s-blaze-server, accepts connections unboundedly on its selector 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. http4s provides a general "MaxActiveRequests" middleware mechanism for limiting open connections, but it 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. In 0.21.17, 0.22.0-M2, and 1.0.0-M14, a new "maxConnections" property, with a default value of 1024, has been added to the `BlazeServerBuilder`. Setting the value to a negative number restores unbounded behavior, but is strongly disrecommended. The NIO2 backend does not respect `maxConnections`. Its use is now deprecated in http4s-0.21, and the option is removed altogether starting in http4s-0.22. There are several possible workarounds described in the re
osv:CVE-2021-21294
Complete source record
{
"id": "4fd848cbf53137afc6f5d921ac3a1afc30a00bbeef675e1022057ced2988f219",
"url": "https://osv.dev/vulnerability/CVE-2021-21294",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-21294",
"summary": "Http4s (http4s-blaze-server) is a minimal, idiomatic Scala interface for HTTP services. Http4s before versions 0.21.17, 0.22.0-M2, and 1.0.0-M14 have a vulnerability which can lead to a denial-of-service. Blaze-core, a library underlying http4s-blaze-server, accepts connections unboundedly on its selector 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. http4s provides a general \"MaxActiveRequests\" middleware mechanism for limiting open connections, but it 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. In 0.21.17, 0.22.0-M2, and 1.0.0-M14, a new \"maxConnections\" property, with a default value of 1024, has been added to the `BlazeServerBuilder`. Setting the value to a negative number restores unbounded behavior, but is strongly disrecommended. The NIO2 backend does not respect `maxConnections`. Its use is now deprecated in http4s-0.21, and the option is removed altogether starting in http4s-0.22. There are several possible workarounds described in the re",
"evidence": "osv:CVE-2021-21294",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-21294",
"aliases": [
"CVE-2021-21294",
"GHSA-xhv5-w9c5-2r2w"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/http4s/http4s",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "d34c5d326dd0a7144f0db0f9a9b52bfae873aae4"
},
{
"fixed": "987d6589ef79545b9bb2324ac4bdebf82d9a0171"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.21.17"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "987d6589ef79545b9bb2324ac4bdebf82d9a0171"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.0.0-M13",
"v1.0.0-M12",
"v1.0.0-M11",
"v0.21.16",
"v0.21.15",
"v1.0.0-M10",
"v0.21.14",
"v1.0.0-M9",
"v0.21.13",
"v1.0.0-M8",
"v0.21.12",
"v0.21.11",
"v1.0.0-M7",
"v1.0.0-M6",
"v0.21.9",
"v0.21.8",
"v1.0.0-M5",
"v0.21.7",
"v1.0.0-M4",
"v0.21.6",
"v1.0.0-M3",
"v0.21.5",
"v1.0.0-M2",
"v1.0.0-M1",
"v0.21.4",
"v0.21.3",
"v0.21.1",
"v0.21.0",
"v0.21.0-RC5",
"v0.21.0-RC4",
"v0.21.0-RC3",
"v0.21.0-RC2",
"v0.21.0-RC1",
"v0.21.0-M6",
"v0.21.0-M5",
"v0.21.0-M4",
"v0.21.0-M3",
"v0.21.0-M1",
"v0.20.0",
"v0.20.0-RC1",
"v0.20.0-M7",
"v0.20.0-M6",
"v0.20.0-M5",
"v0.20.0-M4",
"v0.20.0-M3",
"v0.20.0-M2",
"v0.20.0-M1",
"v0.19.0",
"v0.19.0-M3",
"v0.19.0-M2",
"v0.19.0-M1",
"v0.18.0",
"v0.18.0-M9",
"v0.18.0-M8",
"v0.18.0-M7",
"v0.18.0-M6",
"v0.18.0-M5",
"v0.18.0-M4",
"v0.18.0-M3",
"v0.18.0-M2",
"v0.18.0-M1",
"v0.17.0-M1",
"v0.14.1",
"v0.14.0",
"v0.13.0",
"v0.12.0",
"v0.11.0",
"v0.10.0",
"v0.9.0",
"v0.8.1",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.3.0",
"v0.2.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21294.json"
}
}
],
"modified": "2026-10-20T10:54:28.062834655Z",
"provider": "osv",
"references": [
"https://github.com/http4s/blaze/security/advisories/GHSA-xmw9-q7x9-j5qc",
"https://github.com/http4s/http4s/security/advisories/GHSA-xhv5-w9c5-2r2w",
"https://github.com/http4s/http4s/commit/987d6589ef79545b9bb2324ac4bdebf82d9a0171"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-21294",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385401,
"published_at": "2021-02-02T22:15:12.387+00:00"
}