GHSA-q8gf-9rvj-gmgj

Suggest an improvement
Source
https://github.com/advisories/GHSA-q8gf-9rvj-gmgj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-q8gf-9rvj-gmgj/GHSA-q8gf-9rvj-gmgj.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-q8gf-9rvj-gmgj
Aliases
Published
2026-08-25T18:12:05Z
Modified
2026-08-26T00:38:22Z
Severity
  • 8.7 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
gRPC Erlang package has unbounded request body accumulation in `read_full_body/3`
Details

Summary

'Elixir.GRPC.Server.Adapters.Cowboy.Handler':read_full_body/3 accumulates every received chunk into a single growing binary with no size cap. When the client omits the grpc-timeout header, the read timeout resolves to :infinity, allowing a slow-trickle attacker to hold the connection open indefinitely while memory grows. A single unauthenticated connection is sufficient to exhaust BEAM memory and crash the node.

Details

The read loop in lib/grpc/server/adapters/cowboy/handler.ex calls :cowboy_req.read_body/2 in a recursive loop, concatenating each chunk: body <> data. There is no running-total check and no configurable maximum body size. As the loop drains the receive buffer, cowboy issues fresh HTTP/2 WINDOW_UPDATE frames, so the client can keep pushing data indefinitely.

The grpc-timeout header is attacker-supplied and optional. When absent, timeout_left_opt(nil) returns :infinity, so the per-chunk read also has no deadline. The two missing controls compound: a fast client can blast multi-gigabyte payloads directly into memory; a slow client can trickle data forever.

PoC

  1. Start any grpc server exposing a unary RPC (no special configuration required).
  2. Open an HTTP/2 connection and send a POST to any unary RPC path with Content-Type: application/grpc+proto — omit the grpc-timeout header.
  3. Stream a large body (e.g. 1 GiB) in chunks without sending the final END_STREAM flag immediately.
  4. Observe BEAM memory growing proportionally to uploaded data with no server-side cap.

Impact

Affects grpc ≥ 0.3.1. No authentication, no special configuration, and no specific RPC method required, the unbounded read is on the default unary ingress path.

References

Database specific
{
    "cwe_ids":  [
        "CWE-770"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-25T18:12:05Z",
    "nvd_published_at":  "2026-06-15T23:16:45Z",
    "severity":  "HIGH"
}
References

Affected packages

Hex / grpc

Package

Name
grpc
Purl
pkg:hex/grpc

Affected ranges

Type
SEMVER
Events
Introduced
0.3.1
Fixed
1.0.0

Affected versions

0.*
0.3.1
0.4.0-alpha.1
0.4.0-alpha.2
0.5.0-beta
0.5.0-beta.1
0.5.0
0.6.0
0.7.0
0.8.0
0.8.1
0.9.0
0.10.0
0.10.1
0.10.2
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.11.5
1.*
1.0.0-rc.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-q8gf-9rvj-gmgj/GHSA-q8gf-9rvj-gmgj.json"