CVE-2026-71397: Unbounded request body accumulation on streaming RPCs causes memory exhaustion in grpc_server

Published Nov 6, 2026
·
Updated

Summary

Allocation of Resources Without Limits or Throttling vulnerability in elixir-grpc grpcserver allows unauthenticated attackers to exhaust memory and crash the node via an oversized client-streaming or bidirectional-streaming request body.

The streaming read clause of 'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3 (grpcserver/lib/grpc/server/adapters/cowboy/handler.ex) never checks the configured maxbodysize. Only the unary read path enforces that cap. 'Elixir.GRPC.Server.Adapters.Cowboy':readingstream/1 (grpcserver/lib/grpc/server/adapters/cowboy.ex) appends every received chunk to its buffer until a complete length-prefixed message arrives. A client can declare a very large message and send it across many small HTTP/2 DATA frames, and the server buffers all of it.

This issue affects grpcserver: from 1.0.0 before 1.0.6.

Details

1. The cap applies to unary reads only

The commit that added maxbodysize checks it in readfullbody/4, which serves unary requests through the {:readfullbody, ref, pid} clause of 'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3. The {:readbody, ref, pid} clause, which serves streaming requests, returns each chunk to the caller with no size check.

2. Unbounded buffering

'Elixir.GRPC.Server.Adapters.Cowboy':readingstream/1 reads chunks through that clause and appends each one to a binary buffer. It emits a message only when GRPC.Message.getmessage/1 finds a complete length-prefixed gRPC message in the buffer. Until then, the buffer grows with every chunk.

3. Memory exhaustion

A client that declares a large message length and keeps sending DATA frames without ENDSTREAM makes the buffer grow without limit. The BEAM eventually runs out of memory and the node crashes.

Proof of concept

1. Start a grpcserver endpoint that exposes a client-streaming or bidirectional-streaming RPC method. 2. Open an HTTP/2 connection and send a request to that method. 3. Send the request body across many small HTTP/2 DATA frames without ENDSTREAM, well past the configured maxbodysize. 4. Observe that the server buffers all of it and server memory grows. The equivalent unary call is rejected with RESOURCEEXHAUSTED.

Impact

An unauthenticated client can crash a grpcserver node through one streaming RPC connection. This takes down every service on that node.

Configurations

The server must expose at least one client-streaming or bidirectional-streaming RPC method.

Other sources

Allocation of Resources Without Limits or Throttling vulnerability in elixir-grpc grpcserver allows unauthenticated attackers to exhaust memory and crash the node via an oversized client-streaming or bidirectional-streaming request body.

The streaming read clause of 'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3 (grpcserver/lib/grpc/server/adapters/cowboy/handler.ex) never checks the configured maxbodysize. Only the unary read path enforces that cap. 'Elixir.GRPC.Server.Adapters.Cowboy':readingstream/1 (grpcserver/lib/grpc/server/adapters/cowboy.ex) appends every received chunk to its buffer until a complete length-prefixed message arrives. A client can declare a very large message and send it across many small HTTP/2 DATA frames, and the server buffers all of it.

This issue affects grpcserver: from 1.0.0 before 1.0.6.

— MITRE

Affected Software

1 affected componentFixes available
erlang/grpc_server>=1.0.0<1.0.6
1.0.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 1.0.6
  2. Upgrade

    Upgrade grpc_server to a version that resolves this vulnerability.

    Fixed in 1.0.6

Event History

Nov 6, 2026
CVE Published
via MITRE·09:02 PM
Data Sourced
via MITRE·09:02 PM
DescriptionWeakness
Data Sourced
via OSV·09:02 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

grpc_server versions from 1.0.0 before 1.0.6 are affected when they accept client-streaming or bidirectional-streaming RPC requests. Unary RPC handling uses the body-size cap and is not the vulnerable read path.

2

Does configuring max_body_size protect streaming RPCs?

No. The configured max_body_size is checked for unary reads only; the streaming read path does not enforce it and continues buffering chunks until a complete length-prefixed message is received.

3

What does an attacker need to exploit this?

An unauthenticated attacker needs to be able to send a client-streaming or bidirectional-streaming HTTP/2 request to the server. They can declare a very large message and deliver it in many small DATA frames, causing the server to accumulate it in memory.

4

What should be done if an affected version is in use?

Upgrade grpc_server to 1.0.6 or later. Until then, limiting or disabling exposure to client-streaming and bidirectional-streaming RPC endpoints reduces the affected attack surface.

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