Listen to this Post
CVE-2026-48853 is a critical-severity vulnerability (CVSS v4.0: 9.2) affecting the elixir-grpc library (Hex package grpc), an Elixir/BEAM implementation of the gRPC protocol. The flaw resides in the Erlpack codec implementation within lib/grpc/codec/erlpack.ex. The vulnerable function, GRPC.Codec.Erlpack.decode/2, calls `:erlang.binary_to_term/1` directly on the raw gRPC message body without the `:safe` option, without any size limit, and without any type validation.
The absence of the `:safe` flag is critical because `:erlang.binary_to_term/1` fully reconstructs all Erlang term types from wire data, including atoms and funs. BEAM atoms are never garbage-collected, and the global atom table is bounded at approximately 1,048,576 entries. A crafted payload that encodes a large number of fresh atoms can saturate this table and crash the entire BEAM virtual machine, taking down all applications running on the node.
Simultaneously, because the `:safe` option is not used, `binary_to_term/1` reconstructs `fun` and `external-fun` terms from wire data. If the decoded value reaches any downstream call site that applies it—such as Enum.map/2, Task.async/1, or a direct function invocation—the attacker-controlled code executes inside the server process.
A crucial prerequisite for exploitation is that `GRPC.Codec.Erlpack` is not registered by default; it must be explicitly added to the server’s `codecs` option. Servers using only the default protobuf codec are not affected. An unauthenticated attacker can send a gRPC-framed POST request to any RPC path with Content-Type: application/grpc+erlpack—no authentication, session token, or valid protobuf schema is required. This makes the vulnerability highly reachable from the internet in standard deployments. The issue affects `grpc` versions 0.4.0 through 0.9.x; version 1.0.0 contains the fix.
DailyCVE Form:
Platform: elixir-grpc
Version: 0.4.0–0.9.x
Vulnerability: Unsafe deserialization (CWE-502, CWE-770)
Severity: CRITICAL (CVSS 9.2)
Date: 2026-06-15
Prediction: Patch already available (v1.0.0)
What Undercode Say:
Analytics & Detection
To identify whether your gRPC server is vulnerable, check the `codecs` configuration:
Check if Erlpack is registered in your gRPC server configuration grep -r "GRPC.Codec.Erlpack" config/ lib/ --include=".ex" --include=".exs"
Check your mix.lock for vulnerable grpc versions grep "grpc" mix.lock Vulnerable: 0.4.0 through 0.9.x Fixed: 1.0.0 or higher
Audit all codecs registered in your application Look for: codecs: [GRPC.Codec.Erlpack, ...] find . -name ".ex" -o -name ".exs" | xargs grep -l "codecs:"
Network-level detection – Monitor for incoming gRPC requests with the following header:
Look for suspicious Content-Type header in gRPC traffic tcpdump -i any -A -s 0 | grep -i "content-type: application/grpc+erlpack"
Exploit: (Educational Purposes!)
Prerequisite: A gRPC server with `codecs: [GRPC.Codec.Erlpack]` configured.
Step 1 – Establish HTTP/2 connection to the target gRPC server.
Step 2 – Send a gRPC-framed POST to any RPC path with the following characteristics:
– `Content-Type: application/grpc+erlpack`
– Body: `:erlang.term_to_binary(fn ->
Step 3 – For DoS: Send payloads encoding fresh atoms in a loop until the atom table (~1,048,576 entries) is exhausted and the BEAM VM crashes.
Step 4 – For RCE: The server’s `decode/2` materializes the fun; any downstream call site that invokes the decoded value executes the attacker’s code.
Protection:
- Immediate – Upgrade: Update the `grpc` Hex package to version 1.0.0 or later. The fix replaces the unsafe call with `:erlang.binary_to_term/2` using the `:safe` option and adds a type guard that rejects decoded terms containing
fun,pid,port, or `reference` types. - Workaround (if upgrade is not immediately possible): Remove `GRPC.Codec.Erlpack` from the server’s `codecs` configuration. Servers that do not explicitly register the Erlpack codec cannot be reached by this attack.
- Patch commit: 272a97a
Impact:
- Affected versions: `grpc` ≥ 0.4.0 through < 1.0.0
- Attack vector: Network, unauthenticated
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High (full BEAM node crash)
- Prerequisite: Server must explicitly register `GRPC.Codec.Erlpack`
– RCE exploitable only if decoded fun term flows into a call site that invokes it (e.g.,Enum.map,Task.async, direct invocation)
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

