{"id":"EEF-CVE-2026-123635","summary":"Refused calls drain the HTTP/2 connection flow-control window in elixir-grpc grpc_server","details":"## Summary\n\nMissing Release of Resource after Effective Lifetime vulnerability in elixir-grpc grpc_server allows a client to stall all later calls on a shared HTTP/2 connection via calls that the server refuses while their DATA frames are in flight.\n\nThe stream handler `grpc_stream_h` (`grpc_server/src/grpc_stream_h.erl`) requests flow from Cowboy only for request data that has arrived. When the server refuses a call early, for example because the body exceeds `max_body_size` or the method is not implemented, Cowboy drops the DATA frames still in flight for that stream. Their bytes are not returned to the connection flow-control window. After enough refused calls the window is empty. No call on that connection can then send a request body, and each call waits until its deadline. Other connections are not affected.\n\nThis issue affects grpc_server: from 1.0.0 before 1.1.0.\n\n## Details\n\n**1. Flow is requested only for data that arrived**\n\nCowboy increases the HTTP/2 connection window only when a stream handler returns a `{flow, N}` command. `grpc_stream_h` returns that command only for request data it has received.\n\n**2. A refused call leaves data uncredited**\n\nWhen the server refuses a call, the stream stops. The client can still have DATA frames in flight for it. Cowboy drops those frames without running the handler, so no flow is requested for their bytes and no connection-level `WINDOW_UPDATE` is sent.\n\n**3. The window empties**\n\nEach refused call with DATA in flight reduces the connection window for good. With the default 65,535-byte window, the window was empty after two refused calls in a test against v1.0.6. An empty window stops all request data, so no handler requests flow again and the window stays empty.\n\n**4. Result**\n\nEvery later call on the connection that has a request body waits until its deadline. A new connection works normally.\n\n## Proof of concept\n\n1. Start a gRPC server with a small `max_body_size`, for example 1000 bytes.\n2. Open one HTTP/2 connection with a client that tracks the connection window.\n3. Send a unary call with a body above the limit and wait for the `RESOURCE_EXHAUSTED` reply.\n4. Send more DATA frames on the refused stream, up to what the stream and connection windows allow.\n5. Repeat steps 3 and 4 on new streams until the connection window is 0.\n6. Send a small valid unary call on the same connection. Observe that its body cannot be sent and that the call ends at its deadline.\n\n## Impact\n\nA client whose calls share an HTTP/2 connection with other callers can make all later calls on that connection wait until their deadlines. Calls on other connections are served normally.\n\n## Workarounds\n\nPut a Cowboy stream handler in front of `grpc_stream_h` with the adapter option `stream_handlers: [MyHandler, :grpc_stream_h]`. In `init/3`, the handler calls `:cowboy_stream.init/3` and adds a `{:flow, size}` command when the request has a body, where `size` is Cowboy's `max_frame_size_received` (16384 by default). It passes all other callbacks to `:cowboy_stream`.\n\n## Configurations\n\nCalls from more than one caller must share one HTTP/2 connection to the server, for example through a proxy or a shared client channel.","aliases":["CVE-2026-123635","GHSA-7x9q-vvph-rjcr"],"modified":"2026-11-19T07:00:02.889560921Z","published":"2026-11-13T15:40:16.288Z","database_specific":{"cwe_ids":["CWE-772"],"capec_ids":["CAPEC-131"],"cpe_ids":["cpe:2.3:a:elixir-grpc:grpc_server:*:*:*:*:*:*:*:*"]},"references":[{"type":"ADVISORY","url":"https://github.com/elixir-grpc/grpc/security/advisories/GHSA-7x9q-vvph-rjcr"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-123635.html"},{"type":"WEB","url":"https://github.com/elixir-grpc/grpc/commit/0332faae5f5e132314794dbfdae5edecbccea292"},{"type":"FIX","url":"https://github.com/elixir-grpc/grpc/commit/61a71948e6e7b95efb27d48e7084c764503cc802"},{"type":"PACKAGE","url":"https://hex.pm/packages/grpc_server"}],"affected":[{"package":{"name":"grpc_server","ecosystem":"Hex","purl":"pkg:hex/grpc_server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0"},{"fixed":"1.1.0"}]}],"versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-123635.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/elixir-grpc/grpc","events":[{"introduced":"0332faae5f5e132314794dbfdae5edecbccea292"},{"fixed":"61a71948e6e7b95efb27d48e7084c764503cc802"}]}],"versions":["v1.0.6","v1.0.3","v1.0.0"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-123635.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"}],"credits":[{"name":"Aaron Lovi","type":"FINDER"},{"name":"Aaron Lovi","type":"REPORTER"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"},{"name":"Paulo Valente","type":"REMEDIATION_DEVELOPER"}]}