GHSA-mwr4-5g34-j5cq

Suggest an improvement
Source
https://github.com/advisories/GHSA-mwr4-5g34-j5cq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-mwr4-5g34-j5cq/GHSA-mwr4-5g34-j5cq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mwr4-5g34-j5cq
Aliases
Published
2026-08-25T18:11:15Z
Modified
2026-08-26T00:38:22Z
Severity
  • 7.6 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
gRPC Erlang package's path bindings are overridable by query string and request body
Details

Summary

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.

Details

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.

PoC

  1. Deploy a transcoded gRPC service with a route like GET /users/{user_id}/profile where the handler authorizes access based on request.user_id.
  2. Send: GET /users/me/profile?user_id=victim
  3. The decoded request struct has user_id = "victim" — the authorization check passes for the victim's resource, not the caller's.
  4. Alternatively, for a POST with body: "*": send {"user_id": "victim"} in the JSON body.

Impact

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.

References

Database specific
{
    "cwe_ids":  [
        "CWE-639"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-25T18:11:15Z",
    "nvd_published_at":  "2026-06-15T23:16:45Z",
    "severity":  "HIGH"
}
References

Affected packages

Hex / grpc

Package

Name
grpc
Purl
pkg:hex/grpc

Affected ranges

Type
SEMVER
Events
Introduced
0.8.0
Fixed
1.0.0

Affected versions

0.*
0.8.0
0.8.1
0.9.0
0.10.0
0.10.1
0.10.2
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.11.5
1.*
1.0.0-rc.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-mwr4-5g34-j5cq/GHSA-mwr4-5g34-j5cq.json"