GHSA-q8gf-9rvj-gmgj: Erlang/grpc vulnerability

Published Aug 25, 2026
·
Updated

Summary

'Elixir.GRPC.Server.Adapters.Cowboy.Handler':readfullbody/3 accumulates every received chunk into a single growing binary with no size cap. When the client omits the grpc-timeout header, the read timeout resolves to :infinity, allowing a slow-trickle attacker to hold the connection open indefinitely while memory grows. A single unauthenticated connection is sufficient to exhaust BEAM memory and crash the node.

Details

The read loop in lib/grpc/server/adapters/cowboy/handler.ex calls :cowboyreq.readbody/2 in a recursive loop, concatenating each chunk: body <> data. There is no running-total check and no configurable maximum body size. As the loop drains the receive buffer, cowboy issues fresh HTTP/2 WINDOWUPDATE frames, so the client can keep pushing data indefinitely.

The grpc-timeout header is attacker-supplied and optional. When absent, timeoutleftopt(nil) returns :infinity, so the per-chunk read also has no deadline. The two missing controls compound: a fast client can blast multi-gigabyte payloads directly into memory; a slow client can trickle data forever.

PoC

1. Start any grpc server exposing a unary RPC (no special configuration required). 2. Open an HTTP/2 connection and send a POST to any unary RPC path with Content-Type: application/grpc+proto — omit the grpc-timeout header. 3. Stream a large body (e.g. 1 GiB) in chunks without sending the final ENDSTREAM flag immediately. 4. Observe BEAM memory growing proportionally to uploaded data with no server-side cap.

Impact

Affects grpc ≥ 0.3.1. No authentication, no special configuration, and no specific RPC method required, the unbounded read is on the default unary ingress path.

References

Introduction commit: https://github.com/elixir-grpc/grpc/commit/d1abe70a6cad6dac4a3f8235d883d7c896989560 Patch commit: https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00

Affected Software

1 affected componentFixes available
erlang/grpc>=0.3.1<1.0.0
1.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/grpc to a version that resolves this vulnerability.

    Fixed in 1.0.0
  2. Upgrade

    Upgrade elixir-grpc/grpc to a version that resolves this vulnerability.

    Patch 49e18c3ec6bb9afe2f712caad3dbab5c56a68a00
  3. Compensating control

    Apply a network-level mitigation to limit how much data an unauthenticated client can send to the gRPC unary ingress path (e.g., use an upstream reverse proxy/WAF/ingress controls to cap request body size and/or enforce timeouts on HTTP/2 connections and POSTs to unary RPC endpoints).

Event History

Aug 25, 2026
Advisory Published
via GitHub·06:12 PM
Data Sourced
via GitHub·06:12 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

Any unauthenticated client that can establish a connection to a grpc server exposing a unary RPC can exploit it. A single connection is sufficient to exhaust BEAM memory and crash the node.

2

What does an attacker need to do?

The attacker sends a request body without a size limit being enforced and omits the optional grpc-timeout header. They can either send a very large payload quickly or trickle data slowly while keeping the connection open indefinitely.

3

Is a grpc-timeout header sufficient protection?

A grpc-timeout can limit the per-chunk read deadline, but it does not address the absence of a maximum body size. The issue is compounded when the header is omitted, because the timeout becomes :infinity.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203