CVE-2026-48853: Grpc Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-grp7-v8xh-rj7h
CWE-502 CWE-770
Published
Advisory Summary

CVE-2026-48853 is a CRITICAL remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Grpc libraries in the Hex ecosystem. The issue involves grpc erlang package vulnerable to remote code execution with attacker-controlled grpc payloads. Remediation is available by upgrading affected packages to version 1.0.0.

CVE-2026-48853 at a Glance

CVE Identifier CVE-2026-48853
GHSA Identifier GHSA-grp7-v8xh-rj7h
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Grpc
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2026-48853

To remediate this vulnerability, upgrade all affected Grpc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

grpc fixed: 1.0.0
Upgrade grpc to 1.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for grpc

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-48853, inspect your project dependencies for Grpc:

inspect dependencies for grpc

Analyze the terminal output to locate any version of Grpc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Grpc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `GRPC.Codec.Erlpack.decode/2` calls `:erlang.binary_to_term/1` directly on the raw gRPC message body without the `:safe` option. Any unauthenticated peer that can reach a gRPC endpoint with `Content-Type: application/grpc+erlpack` can crash the entire BEAM node via atom table exhaustion or, if a decoded fun term flows into a call site that invokes it, achieve remote code execution inside the server process. ### Details **Root cause** — `lib/grpc/codec/erlpack.ex` implements `decode/2` as a bare `:erlang.binary_to_term(binary)` call with no `:safe` flag, no size limit, and no type validation. This has two independent exploitation paths: **1. DoS via atom exhaustion** — BEAM atoms are never garbage-collected and the global atom table is bounded (~1,048,576 entries). A crafted payload encoding large numbers of fresh atoms saturates the table and crashes the entire VM, taking down all applications on the node. **2. RCE via fun materialization** — Without `:safe`, `binary_to_term/1` reconstructs fun and external-fun terms from wire data. If the decoded value reaches any call site that applies it (e.g. `Enum.map`, `Task.async`, direct invocation), attacker-controlled code executes inside the server process. **Configuration requirement:** `GRPC.Codec.Erlpack` is not registered by default and must be explicitly added to the server's `codecs` option. ### PoC 1. Start a gRPC server with `codecs: [GRPC.Codec.Erlpack]`. 2. Open an HTTP/2 connection to the server. 3. Send a gRPC-framed POST to any RPC path with `Content-Type: application/grpc+erlpack` and a body of `:erlang.term_to_binary(fn -> <malicious_code> end)`. 4. The server's `decode/2` materializes the fun; any downstream call site that invokes the decoded value executes the attacker's code. 5. For DoS only: send payloads encoding fresh atoms in a loop until the atom table is exhausted and the VM crashes. ### Impact Affects `grpc` ≥ 0.4.0. Any server that explicitly registers `GRPC.Codec.Erlpack` is vulnerable to unauthenticated node-level DoS and potentially RCE. ### References * Introduction commit: https://github.com/elixir-grpc/grpc/commit/25bcc569fe2cc4478531a6c546c923205fc751c9 * Patch commit: https://github.com/elixir-grpc/grpc/commit/272a97a5ea1b46af1819f14a831fcf35fc91f992

CVE-2026-48853 Affected Grpc Versions

1 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
grpc
Hex
≥ 0.4.0
< 1.0.0
1.0.0

References

Frequently Asked Questions

What is CVE-2026-48853?
CVE-2026-48853 is a security vulnerability in Grpc involving gRPC Erlang package vulnerable to Remote Code Execution with attacker-controlled gRPC payloads under CWE-502: Deserialization of Untrusted Data.
Which Grpc versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: grpc.
What version fixes CVE-2026-48853?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is grpc affected?
Yes, grpc is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What CWE is associated with CVE-2026-48853?
CVE-2026-48853 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Hex dependencies for CVE-2026-48853?
Run the dependency tree command: 'inspect dependencies for grpc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-grp7-v8xh-rj7h",
  "modified" : "2026-08-25T18:09:53Z",
  "published" : "2026-08-25T18:09:53Z",
  "aliases" : [ "CVE-2026-48853" ],
  "summary" : "gRPC Erlang package vulnerable to Remote Code Execution with attacker-controlled gRPC payloads",
  "details" : "### Summary\n\n`GRPC.Codec.Erlpack.decode/2` calls `:erlang.binary_to_term/1` directly on the raw gRPC message body without the `:safe` option. Any unauthenticated peer that can reach a gRPC endpoint with `Content-Type: application/grpc+erlpack` can crash the entire BEAM node via atom table exhaustion or, if a decoded fun term flows into a call site that invokes it, achieve remote code execution inside the server process.\n\n### Details\n\n**Root cause** — `lib/grpc/codec/erlpack.ex` implements `decode/2` as a bare `:erlang.binary_to_term(binary)` call with no `:safe` flag, no size limit, and no type validation. This has two independent exploitation paths:\n\n**1. DoS via atom exhaustion** — BEAM atoms are never garbage-collected and the global atom table is bounded (~1,048,576 entries). A crafted payload encoding large numbers of fresh atoms saturates the table and crashes the entire VM, taking down all applications on the node.\n\n**2. RCE via fun materialization** — Without `:safe`, `binary_to_term/1` reconstructs fun and external-fun terms from wire data. If the decoded value reaches any call site that applies it (e.g. `Enum.map`, `Task.async`, direct invocation), attacker-controlled code executes inside the server process.\n\n**Configuration requirement:** `GRPC.Codec.Erlpack` is not registered by default and must be explicitly added to the server's `codecs` option.\n\n### PoC\n\n1. Start a gRPC server with `codecs: [GRPC.Codec.Erlpack]`.\n2. Open an HTTP/2 connection to the server.\n3. Send a gRPC-framed POST to any RPC path with `Content-Type: application/grpc+erlpack` and a body of `:erlang.term_to_binary(fn -> <malicious_code> end)`.\n4. The server's `decode/2` materializes the fun; any downstream call site that invokes the decoded value executes the attacker's code.\n5. For DoS only: send payloads encoding fresh atoms in a loop until the atom table is exhausted and the VM crashes.\n\n### Impact\n\nAffects `grpc` ≥ 0.4.0. Any server that explicitly registers `GRPC.Codec.Erlpack` is vulnerable to unauthenticated node-level DoS and potentially RCE.\n\n### References\n\n* Introduction commit: https://github.com/elixir-grpc/grpc/commit/25bcc569fe2cc4478531a6c546c923205fc751c9\n* Patch commit: https://github.com/elixir-grpc/grpc/commit/272a97a5ea1b46af1819f14a831fcf35fc91f992",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "grpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/elixir-grpc/grpc/security/advisories/GHSA-grp7-v8xh-rj7h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48853"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elixir-grpc/grpc/pull/540"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elixir-grpc/grpc/commit/272a97a5ea1b46af1819f14a831fcf35fc91f992"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2026-48853.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-48853"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502", "CWE-770" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-25T18:09:53Z",
    "nvd_published_at" : "2026-06-15T23:16:45Z"
  }
}