Critical RCE and DoS Vulnerability in Elixir gRPC Package
The GRPC.Codec.Erlpack decoder in the Elixir gRPC package is vulnerable to unauthenticated remote code execution and node-level denial of service due to insecure deserialization of untrusted gRPC payloads.
CVE search metadata
CVE search record: CVE-2026-48853. EPSS: 0.57%. KEV: no. Product: grpc, grpc (>= 0.4.0, < 1.0.0), grpc (>= 0.3.1, < 1.0.0), grpc (>= 0.8.0, < 1.0.0). Brief: Critical RCE and DoS Vulnerability in Elixir gRPC Package. Brief link: https://feed.craftedsignal.io/briefs/2026-08-grpc-erlpack-rce/
What's new
The grpc package for Elixir (versions 0.4.0 through 0.9.x) contains a critical vulnerability in GRPC.Codec.Erlpack.decode/2 that allows for unauthenticated remote code execution (RCE) and denial of service (DoS). The vulnerability stems from the use of :erlang.binary_to_term/1 on raw gRPC message bodies without the mandatory :safe option. This function is used to deserialize data provided via the application/grpc+erlpack content type.
Because the deserialization process is unsafe, it permits the instantiation of arbitrary terms, including function objects (fun terms) and large numbers of atoms. An attacker can exploit this in two ways: by saturating the BEAM global atom table (which is capped at ~1 million entries) to crash the entire node, or by injecting serialized function terms that execute arbitrary code when subsequently invoked by the host application. This vulnerability is specific to environments where developers have explicitly registered GRPC.Codec.Erlpack in their gRPC server configuration.
Attack Chain
- Attacker identifies a target gRPC server that has explicitly configured
GRPC.Codec.Erlpackas a codec. - Attacker establishes a standard HTTP/2 connection to the gRPC service endpoint.
- Attacker constructs a malicious gRPC payload serialized via
:erlang.term_to_binarycontaining a fun term for RCE or repeated atom definitions for DoS. - Attacker sends an HTTP POST request to the gRPC endpoint with the header
Content-Type: application/grpc+erlpack. - The server's
GRPC.Codec.Erlpack.decode/2function parses the request body and materializes the unsafe terms into the server process memory. - For DoS, the accumulated atoms exhaust the BEAM virtual machine's global atom table, resulting in a node-wide crash.
- For RCE, the malicious fun term is passed to a downstream Elixir call site (such as
Enum.maporTask.async). - The host application executes the attacker-controlled code within the context of the server process.
Impact
Successful exploitation allows unauthenticated attackers to fully compromise the host server by executing arbitrary code with the privileges of the BEAM virtual machine process. Alternatively, attackers can force a complete denial of service by crashing the node through atom table exhaustion. This vulnerability affects any gRPC-based Elixir application that enables the Erlpack codec.
Recommendation
Prioritize the immediate update of the grpc Elixir package to version 1.0.0 or later, which addresses this deserialization flaw. For environments that cannot immediately patch, remove GRPC.Codec.Erlpack from the list of registered codecs in your gRPC server configuration. Detection engineers should inspect server logs for any incoming requests utilizing the application/grpc+erlpack content type and verify if such usage is expected in the production environment.
Immediate actions
Upgrade grpc package to version 1.0.0 or later
Mitigations
Remove GRPC.Codec.Erlpack from registered server codecs
CVE-2026-48853