Junglewise Threat Intelligence

CVE-2026-48853: elixir-grpc RCE and DoS in Erlpack codec

CVE-2026-48853 · Severity: critical · CVSS 9.2 · Published 2026-06-15

Executive brief

The elixir-grpc library contains a critical vulnerability in its Erlpack codec that allows unauthenticated attackers to execute arbitrary code on any server that explicitly enables the Erlpack message format. The vulnerability stems from unsafe deserialization of gRPC messages without validation or restrictions, enabling either complete service crashes through resource exhaustion or direct code execution within the server process.

Technical details

The vulnerability resides in `lib/grpc/codec/erlpack.ex`, where the `decode/2` function calls `:erlang.binary_to_term/1` directly on raw gRPC message bodies without the `:safe` option, size limits, or type validation. This unsafe deserialization enables two independent attack paths: (1) denial-of-service via atom table exhaustion—Erlang atoms are never garbage-collected and the global atom table is capped at ~1,048,576 entries; a crafted payload with fresh atoms saturates the table, crashing the entire BEAM node and all co-hosted applications; (2) remote code execution via fun materialization—without `:safe`, `binary_to_term/1` reconstructs arbitrary callable fun and external-fun terms from the wire; if the deserialized value reaches any invocation site (e.g., `Enum.map`, `Task.async`, direct calls), attacker-controlled code executes in the server process. Attack requires network access to a gRPC endpoint configured with `Content-Type: application/grpc+erlpack`. Configuration requires explicit registration of `GRPC.Codec.Erlpack` in the server's codecs option, but is not enabled by default. The vulnerability affects grpc versions ≥0.4.0 and is patched in version 1.0.0.

Affected products

  • elixir-grpc grpc >= 0.4.0, < 1.0.0

Timeline

  • 2026-06-15: disclosed
  • 2026-08-25: advisory
  • 2026-08-25: patched: Fix released in version 1.0.0

References

Related threats