Am I affected?

type your grpc version to check

Description

Deserialization of Untrusted Data and Allocation of Resources Without Limits or Throttling vulnerabilities in elixir-grpc grpc allow unauthenticated attackers to crash the BEAM node via atom table exhaustion and, when a decoded term flows into a call site that invokes it, achieve remote code execution on the server.

'Elixir.GRPC.Codec.Erlpack':decode/2 (lib/grpc/codec/erlpack.ex) calls :erlang.binary_to_term/1 on the raw gRPC message body without the :safe option, no size bound, and no type guard. Any unauthenticated peer that sends a request with Content-Type: application/grpc+erlpack can send a crafted payload that mints arbitrary new atoms (which are never garbage-collected, exhausting the bounded atom table and crashing the VM) or that encodes a fun term which, if applied anywhere downstream, executes attacker-controlled code inside the server process.

This issue affects grpc from 0.4.0 before 1.0.0.

Weaknesses & attack patterns

Weakness

CWE-502 · Deserialization of Untrusted Data in catalog → MITRE ↗
CWE-770 · Allocation of Resources Without Limits or Throttling in catalog → MITRE ↗

Attack patterns

CAPEC-586 · Object Injection MITRE ↗
CAPEC-231 · Oversized Serialized Data Payloads MITRE ↗

Affected — Hex / grpc Hex.pm ↗ Repository ↗

0.4.0 < 1.0.0 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-grpc:grpc:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.GRPC.Codec.Erlpack'
source files lib/grpc/codec/erlpack.ex
routines 'Elixir.GRPC.Codec.Erlpack':decode/2

Affected — GitHub / elixir-grpc/grpc Repository ↗

25bcc56 < 272a97a affected
every other version: unaffected
cpe cpe:2.3:a:elixir-grpc:grpc:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.GRPC.Codec.Erlpack'
source files lib/grpc/codec/erlpack.ex
routines 'Elixir.GRPC.Codec.Erlpack':decode/2

Configurations

GRPC.Codec.Erlpack must be explicitly registered as a codec on the gRPC server.

References

Credits

Peter Ullrich Finder
Paulo Valente Remediation developer
Jonatan Männchen Analyst

CVSS breakdown

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
« All CVEs