{"answers":{"affected":"4 open source packages ship an affected version, including org.http4s:http4s-blaze-server_2.12 and org.http4s:http4s-blaze-server_2.13. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-21294 in the wild and no public exploit code.","fix":"Upgrade org.http4s:http4s-blaze-server_2.12 to 0.21.17 or later.","what":"CVE-2021-21294 is a high-severity denial of service vulnerability in http4s, published on 2 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-21294 and fix it if it is affected.\n\nWhat it is: CVE-2021-21294 is a high-severity denial of service vulnerability in http4s, published on 2 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-21294 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.http4s:http4s-blaze-server_2.12 (Maven): affected all versions; fixed in 0.21.17\n- org.http4s:http4s-blaze-server_2.12 (Maven): affected all versions; fixed in 0.21.17\n- org.http4s:http4s-blaze-server_2.13 (Maven): affected all versions; fixed in 0.21.17\n- org.http4s:http4s-blaze-server_2.13 (Maven): affected all versions; fixed in 0.21.17\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-21294/ (Markdown: https://insights.sbomify.com/CVE-2021-21294/index.md)","id":"CVE-2021-21294","markdown":"https://insights.sbomify.com/CVE-2021-21294/index.md","name":"CVE-2021-21294","record":{"aliases":["GHSA-xhv5-w9c5-2r2w"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Scala HTTP library","requires_auth":"none","summary":"Attackers can cause denial of service by exhausting OS resources through unbounded connection acceptance in the http4s-blaze-server library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"http4s","vendor":"typelevel"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"description":"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Unbounded connection acceptance in http4s-blaze-server","id":"CVE-2021-21294","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"denial_of_service","year":"2021"},"n_packages":4,"n_references":3,"next":{"headline":"Possible request smuggling in HTTP/2 due missing validation","id":"CVE-2021-21295"},"packages":[{"ecosystem":"Maven","fixed":["0.21.17"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-blaze-server_2.12","purl":null,"source":"GHSA-xhv5-w9c5-2r2w"},{"ecosystem":"Maven","fixed":["0.21.17"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-blaze-server_2.12","purl":"pkg:maven/org.http4s/http4s-blaze-server_2.12","source":"GHSA-xhv5-w9c5-2r2w"},{"ecosystem":"Maven","fixed":["0.21.17"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-blaze-server_2.13","purl":null,"source":"GHSA-xhv5-w9c5-2r2w"},{"ecosystem":"Maven","fixed":["0.21.17"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-blaze-server_2.13","purl":"pkg:maven/org.http4s/http4s-blaze-server_2.13","source":"GHSA-xhv5-w9c5-2r2w"}],"prev":{"headline":"Unbounded connection acceptance leads to file handle exhaustion","id":"CVE-2021-21293"},"products":["http4s"],"published":"2021-02-02","related":[{"cvss_score":9.1,"headline":"Default CORS config allows any origin with credentials","id":"CVE-2021-39185","kev_date_added":null,"published":"2021-09-01"},{"cvss_score":8.7,"headline":"Response Splitting from unsanitized headers in http4s","id":"CVE-2021-41084","kev_date_added":null,"published":"2021-09-21"},{"cvss_score":7.6,"headline":"Local file inclusion vulnerability in http4s","id":"CVE-2020-5280","kev_date_added":null,"published":"2020-03-25"},{"cvss_score":7.5,"headline":"Http4s has fatal error parsing User-Agent and Server headers","id":"CVE-2023-22465","kev_date_added":null,"published":"2023-01-04"},{"cvss_score":6.3,"headline":"Http4s vulnerable to HTTP Request Smuggling due to improper handling of HTTP trailer section","id":"CVE-2025-59822","kev_date_added":null,"published":"2025-09-23"},{"cvss_score":5.8,"headline":"StaticFile.fromUrl can leak presence of a directory","id":"CVE-2021-32643","kev_date_added":null,"published":"2021-05-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["http4s"]},"summary":"Attackers can cause denial of service by exhausting OS resources through unbounded connection acceptance in the http4s-blaze-server library.","url":"https://insights.sbomify.com/CVE-2021-21294/"}