GHSA-Q8GF-9RVJ-GMGJ

Vulnerability from github – Published: 2026-08-25 18:12 – Updated: 2026-08-25 18:12
VLAI
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

  • Introduction commit: https://github.com/elixir-grpc/grpc/commit/d1abe70a6cad6dac4a3f8235d883d7c896989560
  • Patch commit: https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Hex",
        "name": "grpc"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.3.1"
            },
            {
              "fixed": "1.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-48854"
  ],
  "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"
  },
  "details": "### Summary\n\n`\u0027Elixir.GRPC.Server.Adapters.Cowboy.Handler\u0027: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.\n\n### Details\n\nThe read loop in `lib/grpc/server/adapters/cowboy/handler.ex` calls `:cowboy_req.read_body/2` in a recursive loop, concatenating each chunk: `body \u003c\u003e 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.\n\nThe `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.\n\n### PoC\n\n1. Start any `grpc` server exposing a unary RPC (no special configuration required).\n2. Open an HTTP/2 connection and send a POST to any unary RPC path with `Content-Type: application/grpc+proto` \u2014 omit the `grpc-timeout` header.\n3. Stream a large body (e.g. 1 GiB) in chunks without sending the final `END_STREAM` flag immediately.\n4. Observe BEAM memory growing proportionally to uploaded data with no server-side cap.\n\n### Impact\n\nAffects `grpc` \u2265 0.3.1. No authentication, no special configuration, and no specific RPC method required, the unbounded read is on the default unary ingress path.\n\n### References\n\n* Introduction commit: https://github.com/elixir-grpc/grpc/commit/d1abe70a6cad6dac4a3f8235d883d7c896989560\n* Patch commit: https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00",
  "id": "GHSA-q8gf-9rvj-gmgj",
  "modified": "2026-08-25T18:12:05Z",
  "published": "2026-08-25T18:12:05Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/elixir-grpc/grpc/security/advisories/GHSA-q8gf-9rvj-gmgj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48854"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elixir-grpc/grpc/pull/542"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elixir-grpc/grpc/commit/49e18c3ec6bb9afe2f712caad3dbab5c56a68a00"
    },
    {
      "type": "WEB",
      "url": "https://cna.erlef.org/cves/CVE-2026-48854.html"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/elixir-grpc/grpc"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elixir-grpc/grpc/releases/tag/v1.0.0"
    },
    {
      "type": "WEB",
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-48854"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "gRPC Erlang package has unbounded request body accumulation in `read_full_body/3`"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…