/

CVE-2026-37236

Severity:

CRITICAL RISK

(9.8)

Incorrect Access Control (CWE-639) in grpc-gateway

CVE-2026-37236

Deferred

Vulnerability type

Category:

Incorrect Access Control

CWE:

CWE-639

Impact:

Authorization Bypass

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

grpc-gateway v2.28.0 may trust an attacker-controlled HTTP method override when processing certain form-encoded POST requests. This can cause routing to use an unintended method and bypass method-based authorization controls enforced by upstream proxies or web application firewalls.

Affected context

The vulnerability occurs in deployments using grpc-gateway's ServeMux.ServeHTTP while accepting method overrides through the X-HTTP-Method-Override header. Risk is higher when authorization decisions are made by upstream proxies, WAFs, gateways, or routing layers that rely on the original HTTP method and do not consistently enforce the rewritten method.

Exploit preconditions

  • Attack surface: HTTP endpoints handled by grpc-gateway's ServeMux
  • Required access: Ability to send requests to an exposed gateway endpoint; valid application credentials may or may not be required by the surrounding deployment
  • Trigger point: Processing of a form-encoded POST request containing an attacker-controlled method override header
  • Why exploitation is possible: The request method may be rewritten to an arbitrary value before routing, creating inconsistent authorization decisions between upstream controls and the gateway

Why this happens

The underlying bug is insufficient validation and authorization of a client-controlled method override. The gateway accepts an attacker-supplied method value and applies it before routing without restricting it to an approved set or ensuring that upstream and downstream security decisions use the same method.

This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because attacker-controlled request metadata influences the resource or operation selected by authorization logic. More broadly, it represents inconsistent access-control enforcement across HTTP processing layers.

Potential impact

  • Unauthorized access to operations protected by method-based controls
  • Bypass of proxy or WAF rules that distinguish requests by HTTP method
  • Exposure, modification, or deletion of data when route authorization is inconsistent
  • Increased risk of privilege misuse or unauthorized state changes
  • Potential compromise of downstream services reachable through the gateway

General mitigation guidance

Mitigation generally focuses on making HTTP method handling consistent and limiting trust in client-supplied override metadata.

Common defensive patterns include:

  • Disable method overrides by default when they are not required
  • Allow only an explicit, minimal set of method values when overrides are necessary
  • Apply authorization after the final effective method is established
  • Ensure proxies, WAFs, gateways, and applications enforce the same method semantics
  • Reject conflicting or malformed method metadata rather than normalizing it permissively
  • Prefer route and operation authorization that does not depend solely on mutable request headers
  • Run gateway and backend components with least-privilege identities and narrowly scoped permissions

How teams detect issues like this

Organizations can look for:

  • Static analysis and code review findings involving unrestricted reads of method-override headers
  • Request-processing paths that rewrite methods before authorization or routing checks
  • Differences between methods evaluated by upstream controls and methods received by backend services
  • WAF and proxy policies that allow method overrides without an explicit allowlist
  • Telemetry showing unusual method values, conflicting method metadata, or unexpected access to protected operations
  • Integration tests that compare authorization outcomes across proxy, gateway, and backend layers

Automated security review tools may help identify client-controlled routing or authorization inputs that are not constrained consistently.

Sources

SourceLink
github.comgithub.com/grpc-ecosystem/grpc-gateway
github.comgithub.com/grpc-ecosystem/grpc-gateway/commit/72123cd4f32545f6e1376873f412dcdcbcf29acc
s00me00ne.coms00me00ne.com/cve/cve-2026-37236/

Frequently asked

questions

Yes. It can generally be triggered through HTTP requests reaching an affected grpc-gateway endpoint, although authentication and other application controls may still limit which operations are reachable.

The attacker needs network access to a gateway endpoint and the ability to submit requests. Whether valid credentials are required depends on the deployment's authentication and authorization configuration.

Disable method overrides unless they are necessary. If they are required, restrict accepted values, reject unexpected input, and perform authorization using the same effective method used for routing.

Treat request headers as untrusted input, keep method interpretation consistent across all HTTP layers, test authorization through the complete proxy-to-backend path, and enforce explicit policies for method overrides.

Find out what's already
exploitable in your codebase.