{"id":"CVE-2026-71397","aliases":["CVE-2026-71397","EEF-CVE-2026-71397","GHSA-vx6q-cr5q-945g"],"related":[],"kind":"vulnerability","state":"published","title":"Unbounded request body accumulation on streaming RPCs causes memory exhaustion in grpc_server","summary":"Allocation of Resources Without Limits or Throttling vulnerability in elixir-grpc grpc_server allows unauthenticated attackers to exhaust memory and crash the node via an oversized client-streaming or bidirectional-streaming request body.\n\nThe streaming read clause of 'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3 (grpc_server/lib/grpc/server/adapters/cowboy/handler.ex) never checks the configured max_body_size. Only the unary read path enforces that cap. 'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1 (grpc_server/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.\n\nThis issue affects grpc_server: from 1.0.0 before 1.0.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Allocation of Resources Without Limits or Throttling vulnerability in elixir-grpc grpc_server allows unauthenticated attackers to exhaust memory and crash the node via an oversized client-streaming or bidirectional-streaming request body.\n\nThe streaming read clause of 'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3 (grpc_server/lib/grpc/server/adapters/cowboy/handler.ex) never checks the configured max_body_size. Only the unary read path enforces that cap. 'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1 (grpc_server/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.\n\nThis issue affects grpc_server: from 1.0.0 before 1.0.6.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nAllocation of Resources Without Limits or Throttling vulnerability in elixir-grpc grpc_server allows unauthenticated attackers to exhaust memory and crash the node via an oversized client-streaming or bidirectional-streaming request body.\n\nThe streaming read clause of `'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3` (`grpc_server/lib/grpc/server/adapters/cowboy/handler.ex`) never checks the configured `max_body_size`. Only the unary read path enforces that cap. `'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1` (`grpc_server/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.\n\nThis issue affects grpc_server: from 1.0.0 before 1.0.6.\n\n## Details\n\n**1. The cap applies to unary reads only**\n\nThe commit that added `max_body_size` checks it in `read_full_body/4`, which serves unary requests through the `{:read_full_body, ref, pid}` clause of `'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3`. The `{:read_body, ref, pid}` clause, which serves streaming requests, returns each chunk to the caller with no size check.\n\n**2. Unbounded buffering**\n\n`'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1` reads chunks through that clause and appends each one to a binary buffer. It emits a message only when `GRPC.Message.get_message/1` finds a complete length-prefixed gRPC message in the buffer. Until then, the buffer grows with every chunk.\n\n**3. Memory exhaustion**\n\nA client that declares a large message length and keeps sending DATA frames without `END_STREAM` makes the buffer grow without limit. The BEAM eventually runs out of memory and the node crashes.\n\n## Proof of concept\n\n1. Start a `grpc_server` endpoint that exposes a client-streaming or bidirectional-streaming RPC method.\n2. Open an HTTP/2 connection and send a request to that method.\n3. Send the request body across many small HTTP/2 DATA frames without `END_STREAM`, well past the configured `max_body_size`.\n4. Observe that the server buffers all of it and server memory grows. The equivalent unary call is rejected with `RESOURCE_EXHAUSTED`.\n\n## Impact\n\nAn unauthenticated client can crash a `grpc_server` node through one streaming RPC connection. This takes down every service on that node.\n\n## Configurations\n\nThe server must expose at least one client-streaming or bidirectional-streaming RPC method.","format":"markdown","source":"eef"}],"published":"2026-11-06T21:02:03.676Z","modified":"2026-11-25T06:31:01.168Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"1.0.0","fixed":"1.0.6","status":"affected"}],"vendor":"elixir-grpc","product":"grpc_server","package":"grpc_server","cpe":"cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-grpc/grpc","source":"cvelist"},{"ranges":[{"type":"git","introduced":"49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","fixed":"0b663ca53dbf0f36f7f67ff1d0026f4482a18915","status":"affected"}],"vendor":"elixir-grpc","product":"grpc_server","package":"elixir-grpc/grpc","cpe":"cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-grpc/grpc","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.0.6"}],"ecosystem":"Hex","package":"grpc_server","purl":"pkg:hex/grpc_server","source":"eef"},{"ranges":[{"type":"git","introduced":"49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","status":"affected","fixed":"0b663ca53dbf0f36f7f67ff1d0026f4482a18915"}],"repo":"https://github.com/elixir-grpc/grpc","source":"eef"}],"references":[{"url":"https://github.com/elixir-grpc/grpc/security/advisories/GHSA-vx6q-cr5q-945g","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-71397.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-71397","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-grpc/grpc/commit/0b663ca53dbf0f36f7f67ff1d0026f4482a18915","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/grpc_server","tags":["package"],"sources":["eef"]}],"credits":["Arpit Jain","Jonatan Männchen / EEF","Paulo Valente"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-10T14:16:42.568Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-71397","url":"https://www.cve.org/CVERecord?id=CVE-2026-71397","licence":"CVE Terms of Use","modified":"2026-11-19T07:53:36.833Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-71397","url":"https://osv.dev/vulnerability/EEF-CVE-2026-71397","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:01.168Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-71397","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71397","licence":"Public domain","modified":"2026-11-12T20:07:11.090Z"}],"updatedAt":"2026-11-25T22:59:49.326Z","epss":{"score":0.00524,"percentile":0.45941,"date":"2026-12-01T12:00:22.000Z"}}