OSV 1.4.0 · github-reviewed · 修改于 2026-08-26 02:11
发布时间
2026-08-26 02:11
GitHub 审查时间
2026-08-26 02:11
NVD 发布时间
2026-06-16 07:16
源文件
advisories/github-reviewed/2026/08/GHSA-mwr4-5g34-j5cq/GHSA-mwr4-5g34-j5cq.json
In the HTTP-to-gRPC transcoding layer of the grpc Hex package, query-string and request-body parameters can silently overwrite path-bound fields when building the decoded protobuf request struct. An authenticated attacker who can reach a transcoded endpoint can substitute any path-bound identifier (e.g. user_id from /users/{user_id}/profile) with an arbitrary value, bypassing authorization, multi-tenancy, and ownership checks that rely on the path-derived field.
All three clauses of GRPC.Server.Transcode.map_request/5 (grpc_server/lib/grpc/server/transcode.ex) use Map.merge/2 with path bindings as the first argument, giving them the lowest merge precedence. Path bindings are extracted by the router from the matched URL template and should be the authoritative resource identifiers, but query-string and body parameters overwrite them. The decoded protobuf struct handed to the handler carries the attacker's value instead of the router's.
GET /users/{user_id}/profile where the handler authorizes access based on request.user_id.GET /users/me/profile?user_id=victimuser_id = "victim" — the authorization check passes for the victim's resource, not the caller's.POST with body: "*": send {"user_id": "victim"} in the JSON body.Affects applications using grpc ≥ 0.8.0 with HTTP transcoding enabled that rely on path-bound fields for authorization or tenant isolation. Fixed in 1.0.0. An authenticated attacker can read or modify any other user's resources exposed via transcoded endpoints.