Elixir-grpc grpc_server
Path bindings ignored for gRPC Content-Types on transcoded routes in elixir-grpc grpc_server
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_server: from 1.0.0 before 1.1.0; grpc: from 0.8.0 before 1.0.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.0.0, < 1.1.0
Fixed in 1.1.0
- >= 0332faae5f5e132314794dbfdae5edecbccea292, < 953ab980d8a127e895d3ab9505fc4b9337bb32f7
Fixed in 953ab980d8a127e895d3ab9505fc4b9337bb32f7
- >= 0.8.0, < 1.0.0
Fixed in 1.0.0
- >= 8aaf3d3a8c4c7b08ac65e9c6f254e0d24da1d048, < 0332faae5f5e132314794dbfdae5edecbccea292
Fixed in 0332faae5f5e132314794dbfdae5edecbccea292
Mitigation
Upgrade grpc_server to 1.1.0 or later.
Upgrade grpc_server to 953ab980d8a127e895d3ab9505fc4b9337bb32f7 or later.
Upgrade grpc to 1.0.0 or later.
Upgrade grpc to 0332faae5f5e132314794dbfdae5edecbccea292 or later.
References
- Vendor advisory github.com/elixir-grpc/grpc/security/advisorie…
- Patch github.com/elixir-grpc/grpc/commit/0332faae5f5…
- Patch github.com/elixir-grpc/grpc/commit/953ab980d8a…
1 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.