Skip to content
High 8.2

elixir-grpcのgrpc_serverに脆弱性、不完全な要求でCPUを占有されるおそれ

CVE-2026-121809 First seen on SecPulse

Summary

elixir-grpcのgrpc_serverとgrpcには、ストリーミングRPCで途中まで届いた要求を受けると処理が終わらなくなる無限ループの脆弱性があります。認証なしの攻撃者が接続を開いたままにすると、BEAMのスケジューラーを占有され、繰り返しの要求でサービス全体が止まるおそれがあります。grpc_serverは1.1.0、grpcは1.0.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のgrpc_serverとgrpcには、ストリーミングRPCで途中まで届いた要求を受けると処理が終わらなくなる無限ループの脆弱性があります。認証なしの攻撃者が接続を開いたままにすると、BEAMのスケジューラーを占有され、繰り返しの要求でサービス全体が止まるおそれがあります。grpc_serverは1.1.0、grpcは1.0.0で修正されており、修正版への更新が必要です。

Affected packages

PackageAffected → Fixed
elixir-grpcgrpc_server
≥ 0332faae5f5e132314794dbfdae5edecbccea292, < 38955f1392cbf08eef231a347348445410455c85→ 38955f1392cbf08eef231a347348445410455c85
elixir-grpcgrpc
≥ 6d8a09ad919e208fb600538ac8b19bd733a04310, < 0332faae5f5e132314794dbfdae5edecbccea292→ 0332faae5f5e132314794dbfdae5edecbccea292
Hexgrpc_server
≥ 1.0.0, < 1.1.0→ 1.1.0
Hexgrpc
≥ 0.3.1, < 1.0.0→ 1.0.0
Original description The description as published by the source.

Summary

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in elixir-grpc grpc_server and grpc allows unauthenticated attackers to occupy a BEAM scheduler indefinitely via a client-streaming or bidirectional-streaming request whose body ends inside a gRPC message.

GRPC.Server.Adapters.Cowboy.read_stream/1 (grpc_server/lib/grpc/server/adapters/cowboy.ex, and the Cowboy adapter in grpc before the package split) asks for more data whenever the buffer does not hold a complete message. Once the request body has ended, every further read returns an empty chunk, so the buffer never changes and the function retries without end. A single 5-byte length prefix sent with END_STREAM keeps one scheduler busy for as long as the connection stays open, and repeated requests exhaust all schedulers.

This issue affects grpc: from 0.3.1 before 1.0.0; grpc_server: from 1.0.0 before 1.1.0.

Details

1. A partial message

A client sends a 5-byte gRPC length prefix that declares more bytes than follow it, and ends the request body with END_STREAM.

2. The reader asks for more

read_stream/1 calls GRPC.Message.get_message/1, which returns false because the declared message is incomplete. read_stream/1 then sets need_more and reads again through Handler.read_body/1.

3. Every read is empty

Once the body has been read, the handler's async_read_body/2 (and cowboy_req:read_body/2 in older releases) returns an empty chunk at once. The buffer…

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