{"id":"CVE-2026-48853","aliases":["EEF-CVE-2026-48853","GHSA-grp7-v8xh-rj7h"],"url":"https://o3.security/vulnerability/CVE-2026-48853","summary":"Remote code execution and denial of service via unsafe Erlang term deserialization in elixir-grpc/grpc","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","published":"2026-06-15T21:56:15.262Z","modified":"2026-11-19T09:45:25.046341397Z","cvss":null,"epss":{"score":0.00784,"percentile":0.57,"asOf":"2026-11-22"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Hex","name":"grpc","fixedVersion":"1.0.0"}],"fix":{"url":"https://github.com/elixir-grpc/grpc/commit/25bcc569fe2cc4478531a6c546c923205fc751c9","label":"elixir-grpc/grpc@25bcc56"},"references":[{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-48853.html"},{"type":"WEB","url":"https://github.com"},{"type":"WEB","url":"https://osv.dev/vulnerability/EEF-CVE-2026-48853"},{"type":"WEB","url":"https://repo.hex.pm"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48853.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/elixir-grpc/grpc/commit/25bcc569fe2cc4478531a6c546c923205fc751c9"},{"type":"FIX","url":"https://github.com/elixir-grpc/grpc/commit/272a97a5ea1b46af1819f14a831fcf35fc91f992"},{"type":"PACKAGE","url":"https://github.com/elixir-grpc/grpc"},{"type":"WEB","url":"https://github.com/elixir-grpc/grpc/pull/540"},{"type":"WEB","url":"https://github.com/elixir-grpc/grpc/releases/tag/v1.0.0"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-19T09:45:25.046341397Z"}}