Skip to content
High 8.2

grpcの脆弱性、圧縮データで認証なしにサーバーのメモリを使い果たされるおそれ

CVE-2026-121808 First seen on SecPulse

Summary

elixir-grpcのErlpackコーデックに、圧縮されたErlang外部項を含む細工したgRPCメッセージでサーバーのメモリを使い果たされる脆弱性があります。認証は不要で、影響はgrpcが0.4.0から1.0.0未満、grpc_coreが1.0.0から1.1.0未満です。修正版はgrpcが1.0.0、grpc_coreが1.1.0なので、該当する版を使っている場合は修正版へ更新してください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

elixir-grpcのErlpackコーデックに、圧縮されたErlang外部項を含む細工したgRPCメッセージでサーバーのメモリを使い果たされる脆弱性があります。認証は不要で、影響はgrpcが0.4.0から1.0.0未満、grpc_coreが1.0.0から1.1.0未満です。修正版はgrpcが1.0.0、grpc_coreが1.1.0なので、該当する版を使っている場合は修正版へ更新してください。

Affected packages

PackageAffected → Fixed
elixir-grpcgrpc
≥ 25bcc569fe2cc4478531a6c546c923205fc751c9, < 0332faae5f5e132314794dbfdae5edecbccea292→ 0332faae5f5e132314794dbfdae5edecbccea292
elixir-grpcgrpc_core
≥ 0332faae5f5e132314794dbfdae5edecbccea292, < d6bc56ac75dfb6c02db2099909210a37c9be8db6→ d6bc56ac75dfb6c02db2099909210a37c9be8db6
Hexgrpc
≥ 0.4.0, < 1.0.0→ 1.0.0
Hexgrpc_core
≥ 1.0.0, < 1.1.0→ 1.1.0
Original description The description as published by the source.

Summary

Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in elixir-grpc grpc_core and grpc allows unauthenticated attackers to exhaust server memory via a compressed Erlang external term in a gRPC message body.

GRPC.Codec.Erlpack.decode/2 (grpc_core/lib/grpc/codec/erlpack.ex, and lib/grpc/codec/erlpack.ex before the package split) passes the message body to :erlang.binary_to_term/2. That function inflates a compressed term in full before it returns. The codec sets no limit on the decoded size, and its type checks run only on the decoded term. The server's max_body_size limit counts the compressed bytes of the request. A request with Content-Type: application/grpc+erlpack can therefore make the server allocate a term much larger than the request body.

This issue affects grpc: from 0.4.0 before 1.0.0; grpc_core: from 1.0.0 before 1.1.0.

Details

1. Codec selection

The server selects the codec from the request Content-Type. application/grpc+erlpack selects GRPC.Codec.Erlpack when the server registers it. No authentication step comes before this.

2. Size limit on compressed bytes only

The server limits the request body with max_body_size, which counts the bytes received. With the gRPC compressed flag set to 0, the transport decompression limit does not apply, and the message reaches the codec unchanged.

3. Expansion inside binary_to_term/2

GRPC.Codec.Erlpack.decode/2 calls `:erlang.binary_to_term(bin…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details