Summary
http4s has HTTP/2 Denial of Service with Ember Backend
http4s 0.23.x and 1.0 servers running ember with http2 enabled are vulnerable to a denial of service attack using a HPACK bomb vulnerability recently disclosed as affecting other http2 servers.
Details
The issue occurs in the Hpack wrapper. Ember concatenates the header and continuation frames before decoding all headers at once. When the code decodes the attack payload, the relatively small packets decode to a significantly larger amount of data which is returned as a single List which is then held in memory for further processing. With enough concurrent connections (~5 with a 2GB heap in testing) this leads to an OOM, eg:
java.lang.OutOfMemoryError: Java heap space
at scala.collection.mutable.ListBuffer.scala$collection$mutable$ListBuffer$$freshFrom(ListBuffer.scala:129)
at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:147)
at scala.collection.mutable.ListBuffer.addAll(ListBuffer.scala:40)
at scala.collection.mutable.Growable.$plus$plus$eq(Growable.scala:69)
at scala.collection.mutable.Growable.$plus$plus$eq$(Growable.scala:69)
at scala.collection.mutable.AbstractBuffer.$plus$plus$eq(Buffer.scala:314)
at org.http4s.Header$.org$http4s$Header$ToRaw$$anon$10$$_$$lessinit$greater$$anonfun$2(Header.scala:192)
at org.http4s.Header$ToRaw$$anon$10$$Lambda/0x00001fe001239c50.apply(Unknown Source)
at scala.collection.immutable.List.foreach(List.scala:334)
at org.http4s.Header$ToRaw$$anon$10.<init>(Header.scala:192)
at org.http4s.Header$ToRaw$.scalaCollectionSeqToRaw(Header.scala:195)
at org.http4s.Headers$.apply(Headers.scala:220)
at org.http4s.ember.core.h2.PseudoHeaders$.headersToRequestNoBody(PseudoHeaders.scala:95)
at org.http4s.ember.core.h2.H2Stream.receiveHeaders$$anonfun$1$$anonfun$2$$anonfun$3$$anonfun$2(H2Stream.scala:248)
at org.http4s.ember.core.h2.H2Stream$$Lambda/0x00001fe001511fd8.apply(Unknown Source)
at cats.effect.IOFiber.runLoop(IOFiber.scala:429)
at cats.effect.IOFiber.autoCedeR(IOFiber.scala:1460)
at cats.effect.IOFiber.run(IOFiber.scala:129)
at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:935)
Workarounds
If you can't upgrade immediately:
- Disable HTTP/2 in Ember backends
Impact
Denial of Service:
- Affects any http4s server running the ember backend with HTTP/2 enabled that is exposed to untrusted traffic.
- Affects any http4s client running the ember backend with HTTP/2 enabled that can be directed to an untrusted server.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The Hpack handling code has a configurable max header size parameter, but it does not include indexed headers in that accounting, allowing the attack to bypass the limit. There is not any configuration available in current http4s versions that can be enabled to prevent this attack short of disabling http2.
A fix has been tested locally that threads the maxHeaderSize setting from the server builder into the Hpack code. Using this, connections can be prematurely terminated once the decoded data size exceeds the maxHeaderSize that users can already configure.
Frequently Asked Questions
- What is CVE-2026-54556? CVE-2026-54556 is a high-severity security vulnerability in org.http4s:http4s-ember-core_2.12 (maven), affecting versions <= 0.23.34. It is fixed in 0.23.35, 1.0.0-M47.
- Which packages are affected by CVE-2026-54556?
org.http4s:http4s-ember-core_2.12(maven) (versions <= 0.23.34)org.http4s:http4s-ember-core_2.13(maven) (versions >= 1.0.0-M1, < 1.0.0-M46)org.http4s:http4s-ember-core_3(maven) (versions <= 0.23.34)
- Is there a fix for CVE-2026-54556? Yes. CVE-2026-54556 is fixed in 0.23.35, 1.0.0-M47. Upgrade to this version or later.
- Is CVE-2026-54556 exploitable, and should I be worried? Whether CVE-2026-54556 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-54556 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-54556?
- Upgrade
org.http4s:http4s-ember-core_2.12to 0.23.35 or later - Upgrade
org.http4s:http4s-ember-core_2.13to 1.0.0-M47 or later - Upgrade
org.http4s:http4s-ember-core_3to 0.23.35 or later - Upgrade
org.http4s:http4s-ember-core_3to 1.0.0-M47 or later - Upgrade
org.http4s:http4s-ember-core_2.13to 0.23.35 or later
- Upgrade