{"id":"CVE-2026-121809","aliases":["CVE-2026-121809","EEF-CVE-2026-121809","GHSA-c2h9-f9cc-27xh"],"related":[],"kind":"vulnerability","state":"published","title":"CPU exhaustion via a truncated gRPC message on streaming RPCs in elixir-grpc grpc_server","summary":"Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in elixir-grpc grpc_server and grpc allows unauthenticated attackers to occupy a BEAM scheduler indefinitely via a client-streaming or bidirectional-streaming request whose body ends inside a gRPC message.\n\nGRPC.Server.Adapters.Cowboy.read_stream/1 (grpc_server/lib/grpc/server/adapters/cowboy.ex, and the Cowboy adapter in grpc before the package split) asks for more data whenever the buffer does not hold a complete message. Once the request body has ended, every further read returns an empty chunk, so the buffer never changes and the function retries without end. A single 5-byte length prefix sent with END_STREAM keeps one scheduler busy for as long as the connection stays open, and repeated requests exhaust all schedulers.\n\nThis issue affects grpc: from 0.3.1 before 1.0.0; grpc_server: from 1.0.0 before 1.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in elixir-grpc grpc_server and grpc allows unauthenticated attackers to occupy a BEAM scheduler indefinitely via a client-streaming or bidirectional-streaming request whose body ends inside a gRPC message.\n\nGRPC.Server.Adapters.Cowboy.read_stream/1 (grpc_server/lib/grpc/server/adapters/cowboy.ex, and the Cowboy adapter in grpc before the package split) asks for more data whenever the buffer does not hold a complete message. Once the request body has ended, every further read returns an empty chunk, so the buffer never changes and the function retries without end. A single 5-byte length prefix sent with END_STREAM keeps one scheduler busy for as long as the connection stays open, and repeated requests exhaust all schedulers.\n\nThis issue affects grpc: from 0.3.1 before 1.0.0; grpc_server: from 1.0.0 before 1.1.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nLoop with Unreachable Exit Condition ('Infinite Loop') vulnerability in elixir-grpc grpc_server and grpc allows unauthenticated attackers to occupy a BEAM scheduler indefinitely via a client-streaming or bidirectional-streaming request whose body ends inside a gRPC message.\n\n`GRPC.Server.Adapters.Cowboy.read_stream/1` (`grpc_server/lib/grpc/server/adapters/cowboy.ex`, and the Cowboy adapter in `grpc` before the package split) asks for more data whenever the buffer does not hold a complete message. Once the request body has ended, every further read returns an empty chunk, so the buffer never changes and the function retries without end. A single 5-byte length prefix sent with `END_STREAM` keeps one scheduler busy for as long as the connection stays open, and repeated requests exhaust all schedulers.\n\nThis issue affects grpc: from 0.3.1 before 1.0.0; grpc_server: from 1.0.0 before 1.1.0.\n\n## Details\n\n**1. A partial message**\n\nA client sends a 5-byte gRPC length prefix that declares more bytes than follow it, and ends the request body with `END_STREAM`.\n\n**2. The reader asks for more**\n\n`read_stream/1` calls `GRPC.Message.get_message/1`, which returns `false` because the declared message is incomplete. `read_stream/1` then sets `need_more` and reads again through `Handler.read_body/1`.\n\n**3. Every read is empty**\n\nOnce the body has been read, the handler's `async_read_body/2` (and `cowboy_req:read_body/2` in older releases) returns an empty chunk at once. The buffer stays the same, the exit clause for an empty finished buffer never matches, and the loop repeats.\n\n**4. No timeout ends it**\n\nEach iteration is a message round trip between two local processes, not a socket wait, so no I/O timeout applies. Without a `grpc-timeout` header there is no deadline, and the adapter's idle timeout defaults to `:infinity`. One scheduler stays at full load until the client closes the connection.\n\n## Proof of concept\n\n1. Start a server that exposes a client-streaming RPC, for example `RouteGuide.RecordRoute`.\n2. Open an HTTP/2 connection and send `HEADERS` for that method with `content-type: application/grpc` and no `grpc-timeout`.\n3. Send one `DATA` frame with `END_STREAM` that holds only the 5-byte prefix `00 00 00 00 64`, which declares a 100-byte message.\n4. Keep the connection open and observe that no response arrives and one BEAM scheduler stays at 100% CPU until the connection closes.\n\n## Impact\n\nAn unauthenticated client can keep one scheduler busy per open connection with a 5-byte request, and enough connections deny service to every application on the 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-13T16:18:37.954Z","modified":"2026-11-25T17:23:02.943Z","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-400","CWE-835"],"affected":[{"ranges":[{"type":"semver","introduced":"0.3.1","fixed":"1.0.0","status":"affected"}],"vendor":"elixir-grpc","product":"grpc","package":"grpc","cpe":"cpe:2.3:a:elixir-grpc:grpc:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-grpc/grpc","source":"cvelist"},{"ranges":[{"type":"git","introduced":"6d8a09ad919e208fb600538ac8b19bd733a04310","fixed":"0332faae5f5e132314794dbfdae5edecbccea292","status":"affected"}],"vendor":"elixir-grpc","product":"grpc","package":"elixir-grpc/grpc","cpe":"cpe:2.3:a:elixir-grpc:grpc:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-grpc/grpc","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0","fixed":"1.1.0","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":"0332faae5f5e132314794dbfdae5edecbccea292","fixed":"38955f1392cbf08eef231a347348445410455c85","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":"0.3.1","status":"affected","fixed":"1.0.0"}],"ecosystem":"Hex","package":"grpc","purl":"pkg:hex/grpc","source":"eef"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.1.0"}],"ecosystem":"Hex","package":"grpc_server","purl":"pkg:hex/grpc_server","source":"eef"},{"ranges":[{"type":"git","introduced":"6d8a09ad919e208fb600538ac8b19bd733a04310","status":"affected","fixed":"0332faae5f5e132314794dbfdae5edecbccea292"}],"repo":"https://github.com/elixir-grpc/grpc","source":"eef"},{"ranges":[{"type":"git","introduced":"0332faae5f5e132314794dbfdae5edecbccea292","status":"affected","fixed":"38955f1392cbf08eef231a347348445410455c85"}],"repo":"https://github.com/elixir-grpc/grpc","source":"eef"}],"references":[{"url":"https://github.com/elixir-grpc/grpc/security/advisories/GHSA-c2h9-f9cc-27xh","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-121809.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-121809","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/elixir-grpc/grpc/commit/6d8a09ad919e208fb600538ac8b19bd733a04310","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-grpc/grpc/commit/0332faae5f5e132314794dbfdae5edecbccea292","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-grpc/grpc/commit/38955f1392cbf08eef231a347348445410455c85","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/grpc","tags":["package"],"sources":["eef"]},{"url":"https://hex.pm/packages/grpc_server","tags":["package"],"sources":["eef"]}],"credits":["Adam Jordan","Jonatan Männchen / EEF","Peter Ullrich","Marko Vejnovic","Paulo Valente"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-13T17:55:12.226Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-121809","url":"https://www.cve.org/CVERecord?id=CVE-2026-121809","licence":"CVE Terms of Use","modified":"2026-11-19T07:00:39.889Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-121809","url":"https://osv.dev/vulnerability/EEF-CVE-2026-121809","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:02.943Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-121809","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121809","licence":"Public domain","modified":"2026-11-23T15:08:56.100Z"}],"updatedAt":"2026-11-25T22:59:50.744Z","epss":{"score":0.00655,"percentile":0.52648,"date":"2026-12-01T12:00:22.000Z"}}