elixir-grpc grpc_serverで認可を回避される脆弱性、URLと異なるリソースを操作されるおそれ
概要
elixir-grpcのgrpc_serverとgrpcに、HTTPトランスコーディングされたルートでパスの値が無視され、URLと異なるリソースを操作されるおそれがある脆弱性が見つかりました。影響するのはgrpc_serverの1.0.0以上1.1.0未満と、grpcの0.8.0以上1.0.0未満です。修正版はgrpc_serverが1.1.0、grpcが1.0.0で、利用中のバージョンを確認して更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
elixir-grpcのgrpc_serverとgrpcに、HTTPトランスコーディングされたルートでパスの値が無視され、URLと異なるリソースを操作されるおそれがある脆弱性が見つかりました。影響するのはgrpc_serverの1.0.0以上1.1.0未満と、grpcの0.8.0以上1.0.0未満です。修正版はgrpc_serverが1.1.0、grpcが1.0.0で、利用中のバージョンを確認して更新してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| elixir-grpcgrpc_server |
0332faae5f5e132314794dbfdae5edecbccea292 以上 953ab980d8a127e895d3ab9505fc4b9337bb32f7 未満→ 953ab980d8a127e895d3ab9505fc4b9337bb32f7 |
953ab980d8a127e895d3ab9505fc4b9337bb32f7 |
| elixir-grpcgrpc |
8aaf3d3a8c4c7b08ac65e9c6f254e0d24da1d048 以上 0332faae5f5e132314794dbfdae5edecbccea292 未満→ 0332faae5f5e132314794dbfdae5edecbccea292 |
0332faae5f5e132314794dbfdae5edecbccea292 |
| Hexgrpc_server |
1.0.0 以上 1.1.0 未満→ 1.1.0 |
1.1.0 |
| Hexgrpc |
0.8.0 以上 1.0.0 未満→ 1.0.0 |
1.0.0 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
Authorization Bypass Through User-Controlled Key vulnerability in elixir-grpc grpc_server and grpc allows an attacker to make a handler act on a resource other than the one named in the URL of an HTTP-transcoded route, via a request with a gRPC Content-Type.
Only the transcoding clause of GRPC.Server.do_handle_request/4 (grpc_server/lib/grpc/server.ex, and lib/grpc/server.ex before the package split) applies the route's path bindings to the request message. The Cowboy handler picks that clause from the request Content-Type, not from the route. A request to a transcoded URL with application/grpc or application/grpc-web is decoded from the body alone, so every path-bound field takes its value from the body. A gateway, proxy rule or WAF that authorizes on the URL path sees one resource while the handler receives another.
This issue affects grpc: from 0.8.0 before 1.0.0; grpc_server: from 1.0.0 before 1.1.0.
Details
1. The header selects the clause
The Cowboy handler derives the access mode from the request Content-Type. application/json selects :http_transcoding, application/grpc selects :grpc and application/grpc-web+proto selects :grpcweb. The router still matches the transcoded URL template and extracts its path bindings.
2. Bindings are applied in one clause only
GRPC.Server.do_handle_request/4 reads the bindings with adapter.get_bindings/1 and merges them through GRPC.Server.Transcode.map_request/5 only in the `:…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package hex.pm
- package hex.pm
- package github.com
- patch github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com
- web repo.hex.pm