{"id":"CVE-2026-71397","state":"PUBLISHED","title":"Unbounded request body accumulation on streaming RPCs causes memory exhaustion in grpc_server","description":"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.","publishedAt":"2026-11-06T21:02:03.676Z","updatedAt":"2026-11-19T07:53:36.833Z","severity":{"score":8.2,"label":"High","version":"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","source":"EEF"},"assigner":"EEF","products":["elixir-grpc grpc_server"],"affected":[{"vendor":"elixir-grpc","product":"grpc_server","packageName":"grpc_server","packageURL":"pkg:hex/grpc_server","defaultStatus":"unaffected","versions":[{"version":"1.0.0","status":"affected","lessThan":"1.0.6","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*"],"modules":["'Elixir.GRPC.Server.Adapters.Cowboy.Handler'","'Elixir.GRPC.Server.Adapters.Cowboy'"],"programFiles":["lib/grpc/server/adapters/cowboy/handler.ex","lib/grpc/server/adapters/cowboy.ex"],"programRoutines":[{"name":"'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3"},{"name":"'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1"}],"repo":"https://github.com/elixir-grpc/grpc"},{"vendor":"elixir-grpc","product":"grpc_server","packageName":"elixir-grpc/grpc","packageURL":"pkg:github/elixir-grpc/grpc","defaultStatus":"unaffected","versions":[{"version":"49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","status":"affected","lessThan":"0b663ca53dbf0f36f7f67ff1d0026f4482a18915","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*"],"modules":["'Elixir.GRPC.Server.Adapters.Cowboy.Handler'","'Elixir.GRPC.Server.Adapters.Cowboy'"],"programFiles":["grpc_server/lib/grpc/server/adapters/cowboy/handler.ex","grpc_server/lib/grpc/server/adapters/cowboy.ex"],"programRoutines":[{"name":"'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3"},{"name":"'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1"}],"repo":"https://github.com/elixir-grpc/grpc"}],"references":["https://github.com/elixir-grpc/grpc/security/advisories/GHSA-vx6q-cr5q-945g","https://cna.erlef.org/cves/CVE-2026-71397.html","https://osv.dev/vulnerability/EEF-CVE-2026-71397","https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","https://github.com/elixir-grpc/grpc/commit/0b663ca53dbf0f36f7f67ff1d0026f4482a18915"],"weaknesses":["CWE-770"],"ingestedAt":"2026-11-19T08:02:06.095Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/71xxx/CVE-2026-71397.json","commit":"59242d3dd3a5535d8cdda633bb3dc3798967f557","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-71397","state":"PUBLISHED","datePublished":"2026-11-06T21:02:03.676Z","dateUpdated":"2026-11-19T07:53:36.833Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-08-19T10:30:01.929Z"},"containers":{"cna":{"title":"Unbounded request body accumulation on streaming RPCs causes memory exhaustion in grpc_server","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"elixir-grpc","product":"grpc_server","packageName":"grpc_server","packageURL":"pkg:hex/grpc_server","defaultStatus":"unaffected","versions":[{"version":"1.0.0","status":"affected","lessThan":"1.0.6","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*"],"modules":["'Elixir.GRPC.Server.Adapters.Cowboy.Handler'","'Elixir.GRPC.Server.Adapters.Cowboy'"],"programFiles":["lib/grpc/server/adapters/cowboy/handler.ex","lib/grpc/server/adapters/cowboy.ex"],"programRoutines":[{"name":"'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3"},{"name":"'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1"}],"repo":"https://github.com/elixir-grpc/grpc"},{"vendor":"elixir-grpc","product":"grpc_server","packageName":"elixir-grpc/grpc","packageURL":"pkg:github/elixir-grpc/grpc","defaultStatus":"unaffected","versions":[{"version":"49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","status":"affected","lessThan":"0b663ca53dbf0f36f7f67ff1d0026f4482a18915","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*"],"modules":["'Elixir.GRPC.Server.Adapters.Cowboy.Handler'","'Elixir.GRPC.Server.Adapters.Cowboy'"],"programFiles":["grpc_server/lib/grpc/server/adapters/cowboy/handler.ex","grpc_server/lib/grpc/server/adapters/cowboy.ex"],"programRoutines":[{"name":"'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3"},{"name":"'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1"}],"repo":"https://github.com/elixir-grpc/grpc"}],"references":[{"url":"https://github.com/elixir-grpc/grpc/security/advisories/GHSA-vx6q-cr5q-945g","name":"Unbounded request body accumulation on streaming RPCs causes memory exhaustion in grpc_server","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-71397.html","name":"EEF CNA record for CVE-2026-71397","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-71397","name":"OSV record EEF-CVE-2026-71397","tags":["related"]},{"url":"https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00","name":"Introducing commit 49e18c3 in elixir-grpc/grpc","tags":["related"]},{"url":"https://github.com/elixir-grpc/grpc/commit/0b663ca53dbf0f36f7f67ff1d0026f4482a18915","name":"Fix commit 0b663ca in elixir-grpc/grpc","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":8.2,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-770","description":"CWE-770 Allocation of Resources Without Limits or Throttling","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-11-19T07:53:36.833Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The server must expose at least one client-streaming or bidirectional-streaming RPC method.</p>"},{"base64":false,"type":"text/markdown","value":"The server must expose at least one client-streaming or bidirectional-streaming RPC method."}],"value":"The server must expose at least one client-streaming or bidirectional-streaming RPC method."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*","versionEndExcluding":"1.0.6","versionStartIncluding":"1.0.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Arpit Jain"},{"lang":"en","type":"reporter","value":"Arpit Jain"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation developer","value":"Arpit Jain"},{"lang":"en","type":"remediation reviewer","value":"Paulo Valente"}],"datePublic":"2026-11-06T21:02:04.000Z","impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>An unauthenticated client can crash a <code>grpc_server</code> node through one streaming RPC connection. This takes down every service on that node.</p>"},{"base64":false,"type":"text/markdown","value":"An unauthenticated client can crash a `grpc_server` node through one streaming RPC connection. This takes down every service on that node."}],"value":"An unauthenticated client can crash a grpc_server node through one streaming RPC connection. This takes down every service on that node."}]}],"source":{"discovery":"EXTERNAL"},"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Start a <code>grpc_server</code> endpoint that exposes a client-streaming or bidirectional-streaming RPC method.</li>\n<li>Open an HTTP/2 connection and send a request to that method.</li>\n<li>Send the request body across many small HTTP/2 DATA frames without <code>END_STREAM</code>, well past the configured <code>max_body_size</code>.</li>\n<li>Observe that the server buffers all of it and server memory grows. The equivalent unary call is rejected with <code>RESOURCE_EXHAUSTED</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. 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`."}],"value":"* Start a grpc_server endpoint that exposes a client-streaming or bidirectional-streaming RPC method.\n* Open an HTTP/2 connection and send a request to that method.\n* Send the request body across many small HTTP/2 DATA frames without END_STREAM, well past the configured max_body_size.\n* Observe that the server buffers all of it and server memory grows. The equivalent unary call is rejected with RESOURCE_EXHAUSTED."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. The cap applies to unary reads only</strong></p>\n<p>The commit that added <code>max_body_size</code> checks it in <code>read_full_body/4</code>, which serves unary requests through the <code>{:read_full_body, ref, pid}</code> clause of <code>'Elixir.GRPC.Server.Adapters.Cowboy.Handler':info/3</code>. The <code>{:read_body, ref, pid}</code> clause, which serves streaming requests, returns each chunk to the caller with no size check.</p>\n<p><strong>2. Unbounded buffering</strong></p>\n<p><code>'Elixir.GRPC.Server.Adapters.Cowboy':reading_stream/1</code> reads chunks through that clause and appends each one to a binary buffer. It emits a message only when <code>GRPC.Message.get_message/1</code> finds a complete length-prefixed gRPC message in the buffer. Until then, the buffer grows with every chunk.</p>\n<p><strong>3. Memory exhaustion</strong></p>\n<p>A client that declares a large message length and keeps sending DATA frames without <code>END_STREAM</code> makes the buffer grow without limit. The BEAM eventually runs out of memory and the node crashes.</p>"},{"base64":false,"type":"text/markdown","value":"**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."}],"value":"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\n2. 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\n3. 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."}]},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/elixir-grpc/grpc/security/advisories/GHSA-vx6q-cr5q-945g","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-11-10T14:16:42.568773Z","id":"CVE-2026-71397","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-11-10T14:17:05.630Z"}}]}}}