CVE-2026-124278 in grpc_server
Summary
by MITRE • 11/13/2026
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.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/13/2026
The vulnerability identified as an Authorization Bypass Through User-Controlled Key represents a critical flaw in the HTTP transcoding mechanism of the elixir-grpc library, specifically affecting versions prior to 1.1.0 for grpc_server and prior to 1.0.0 for grpc. This issue stems from a fundamental mismatch between how security controls evaluate request paths and how the application server processes those same requests when gRPC content types are utilized. In modern microservices architectures that utilize HTTP transcoding, RESTful endpoints often map directly to underlying gRPC services. Security gateways, web application firewalls, or proxy rules typically enforce access control policies by inspecting the URL path of incoming HTTP requests. These systems assume that the resource identifier present in the URI corresponds exactly to the data fields processed by the backend handler. However, this assumption is violated when a client sends a request with an gRPC Content-Type header, such as application/grpc or application/grpc-web, targeting a transcoded route.
The technical root cause lies within the implementation of the GRPC.Server.do_handle_request/4 function found in lib/grpc/server.ex and its predecessor before the package split. When handling requests, the Cowboy web server handler selects the appropriate clause based on the request Content-Type rather than strictly adhering to the static path bindings defined in the route configuration for all processing steps. For standard HTTP JSON or protobuf transcoded requests, the framework correctly applies the path parameters extracted from the URL to the request message structure. However, when the content type indicates a gRPC payload, the decoding logic extracts data exclusively from the request body. Consequently, any field that is bound in the route path takes its value directly from the corresponding field within the serialized protobuf message sent by the client, rather than retaining the values derived from the URL path. This creates a divergence where the security layer sees one resource identifier in the URI while the application logic operates on a completely different resource identified by the body content.
This discrepancy enables an attacker to bypass authorization controls with significant operational impact. An adversary can craft a malicious request that targets a restricted or sensitive endpoint via its URL path, thereby satisfying any perimeter-based access control checks performed by intermediate security devices. Simultaneously, the attacker modifies the gRPC message body to specify a different resource identifier for the fields bound in the route. The application server then processes this altered body content as if it were part of the original request context. This allows unauthorized actors to perform actions on resources they do not have permission to access, leading to potential data leakage, privilege escalation, or integrity violations depending on the specific functionality exposed by the affected endpoints. The attack is particularly insidious because it exploits a legitimate feature of gRPC transcoding without triggering typical signature-based detection mechanisms that rely solely on URL patterns.
From a classification perspective, this vulnerability aligns with CWE-285: Improper Authorization and CWE-601: URL Redirection to Untrusted Site (URL Traversal). It also maps to the MITRE ATT&CK technique T1078: Valid Accounts or more broadly to unauthorized access patterns where authentication tokens are valid but authorization checks fail due to logic flaws. To mitigate this risk, developers must ensure that path-bound parameters used for resource identification and security decisions are validated against both the URL path and the request body content before processing. The recommended fix involves enforcing consistency between these two sources of truth within the server handler logic. If a field is bound in the route definition, its value from the URL should be strictly enforced or explicitly compared with the corresponding field in the decoded message to detect any tampering. Upgrading to grpc_server version 1.1.0 or later and grpc version 1.0.0 or later resolves this issue by correcting the handling logic for transcoded gRPC requests, ensuring that security boundaries are maintained regardless of the content type used in the request.