CVE-2026-59248: Unbounded HPACK/QPACK prefixed-integer decoding in Cowlib causes memory-exhaustion DoS
Allocation of resources without limits vulnerability in ninenines cowlib allows an unauthenticated remote HTTP/2 or HTTP/3 peer to exhaust memory on the vulnerable server (or client) and cause a denial of service.
The HPACK and QPACK prefixed-integer decoder cowhpackcommon:decbigint/3 in src/cowhpackcommon.hrl (invoked from cowhpack:decode/2 in src/cowhpack.erl and from cowqpack:decodefieldsection/3 in src/cowqpack.erl) reads continuation octets until it sees one whose high bit is clear, evaluating Int + (Value bsl M) at each step with the shift M growing by seven per octet. No limit is enforced on the number of continuation octets, on the resulting bit width, or on the value; the decoder consumes whatever encoded length the peer supplies.
Because Erlang integers are immutable, each intermediate Value bsl M and each accumulator update allocates a fresh bignum whose digit width grows linearly with the number of octets processed so far. Summed across the whole decode, the transient bignum digit materialization is on the order of the square of the encoded length. A single maximal HPACK indexed representation carried inside one HTTP/2 HEADERS plus one CONTINUATION frame at Cowboy's default maxframesizereceived can force hundreds of megabytes of transient allocation and garbage-collection churn before the resulting header-table index is rejected as invalid. Repeated or concurrent connections multiply the pressure and can drive the Erlang VM to memory exhaustion.
Cowlib is the HTTP parser used by Cowboy, RabbitMQ's management plugin, and other Erlang and Elixir HTTP/2 and HTTP/3 servers and clients, so any exposed endpoint that accepts HPACK or QPACK from an untrusted peer is reachable.
This issue affects cowlib: from 2.0.0 before 2.19.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
cowlibto a version that resolves this vulnerability.Fixed in 2.19.0 - Compensating control
Mitigate by restricting or filtering inbound access to any exposed HTTP/2 and HTTP/3 endpoints that accept HPACK/QPACK from untrusted peers, e.g., via network-level access controls (firewall/ACL) to prevent unauthenticated remote peers from reaching those parsers.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-59248?
The severity of CVE-2026-59248 is rated high with a CVSS score of 8.7.
How do I fix CVE-2026-59248?
To fix CVE-2026-59248, you should update to the latest version of cowlib where the vulnerability has been addressed.
What type of attack does CVE-2026-59248 allow?
CVE-2026-59248 allows an unauthenticated remote attacker to perform a memory-exhaustion denial of service on the server or client.
Which software is affected by CVE-2026-59248?
The vulnerability CVE-2026-59248 affects the cowlib software library.
What is the impact of CVE-2026-59248 on systems?
The impact of CVE-2026-59248 can lead to a denial of service due to resource exhaustion on affected systems.