Read the docs
TI-2021-04394 Aliases CVE-2021-21294GHSA-xhv5-w9c5-2r2w

Unbounded connection acceptance in http4s-blaze-server

Priority LOW 37CWE-400Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.

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 refrenced GitHub Advisory GHSA-xhv5-w9c5-2r2w.

Why it matters now

EPSS 0.02172 82nd percentileScored 2026-11-07
Fix Fixed http4s (http4s): 0.21.17org.http4s:http4s-blaze-server_2.12 (Maven): 0.21.17+1 more product

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
http4shttp4sbefore 0.21.170.21.17Patch availableCNA
—org.http4s:http4s-blaze-server_2.12 (Maven)before 0.21.170.21.17Patch availableGHSA-xhv5-w9c5-2r2w
—org.http4s:http4s-blaze-server_2.13 (Maven)before 0.21.170.21.17Patch availableGHSA-xhv5-w9c5-2r2w
  • http4s Vendorhttp4s Affected before 0.21.17 Fixed in 0.21.17 Patch available CNA
  • org.http4s:http4s-blaze-server_2.12 (Maven) Vendor— Affected before 0.21.17 Fixed in 0.21.17 Patch available GHSA-xhv5-w9c5-2r2w
  • org.http4s:http4s-blaze-server_2.13 (Maven) Vendor— Affected before 0.21.17 Fixed in 0.21.17 Patch available GHSA-xhv5-w9c5-2r2w

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*before 0.21.17Vulnerablehttp4s
  • cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:* Versions before 0.21.17 Vulnerable ·http4s

Remediation

  • Fix · CNA http4s (http4s) Fixed in 0.21.17
  • Fix · GHSA-xhv5-w9c5-2r2w org.http4s:http4s-blaze-server_2.12 (Maven) Fixed in 0.21.17 Advisory →
  • Fix · GHSA-xhv5-w9c5-2r2w org.http4s:http4s-blaze-server_2.13 (Maven) Fixed in 0.21.17 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-21294
  2. 2026-10-03 Alias added: GHSA-xhv5-w9c5-2r2w

References

  • TI-2023-08714 Http4s has fatal error parsing User-Agent and Server headers CVSS 3.1HIGH 7.5
  • TI-2025-37261 Http4s vulnerable to HTTP Request Smuggling due to improper handling of HTTP trailer section CVSS 4.0MEDIUM 6.3
  • TI-2020-04336 Local file inclusion vulnerability in http4s CVSS 3.1HIGH 7.6
  • TI-2021-17927 Response Splitting from unsanitized headers in http4s CVSS 3.1HIGH 8.7
  • TI-2021-16571 Default CORS config allows any origin with credentials CVSS 3.1CRITICAL 9.1
  • TI-2021-12311 StaticFile.fromUrl can leak presence of a directory CVSS 3.1MEDIUM 5.8

Sources