{"id":"RUSTSEC-2026-0584","aliases":["GHSA-r5c9-r265-ccg3"],"title":"gRPC `IpKeyExtractor` keys on client-supplied forwarding headers","originalDescription":"`tonic_middleware::IpKeyExtractor` is documented as rate limiting gRPC requests by client IP address, but on a standard tonic server it keys on client-supplied `x-forwarded-for` and `x-real-ip` headers. In 0.5.0–0.9.1, the extractor reads those headers directly; in 0.10.0–0.11.0, it first checks for a bare `std::net::SocketAddr` request extension—which `tonic::transport::Server` never supplies, as it provides `TcpConnectInfo` instead—and falls back to the same headers. Direct clients can therefore choose their rate-limit key to bypass per-IP rate limits and increase the number of tracked keys; without forwarding headers, 0.5.0–0.9.1 allow requests without limiting them and 0.10.0–0.11.0 reject them by default unless `.fail_open()` is enabled. Applications are affected if they use `GrpcRateLimitLayer` with `IpKeyExtractor` (the `tonic-support` feature). The HTTP middleware's `IpKeyExtractor` reads `ConnectInfo<SocketAddr>` and is not affected. Version 0.11.1 fixes `IpKeyExtractor` to honor a server-supplied `SocketAddr` override first and then read the TCP peer address from tonic's `TcpConnectInfo` (which `tonic::transport::Server` attaches to plaintext connections and connections u","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":null,"exploitDb":null},"affected":[{"ecosystem":"crates.io","name":"tokio-rate-limit","range":">=0.5.0, <0.11.1","fixed":"0.11.1"}],"references":[{"url":"https://crates.io/crates/tokio-rate-limit","type":"package"},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0584.html","type":"advisory"},{"url":"https://github.com/sadco-io/tokio-rate-limit/releases/tag/v0.11.1","type":"web"}],"sources":[{"name":"osv","at":"2026-11-20T13:40:41.168Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0584","license":"CC-BY 4.0","firstSeenAt":"2026-11-20T13:07:28.534Z"}],"firstSeenAt":"2026-11-20T13:07:28.534Z","publishedAt":"2026-11-19T12:00:00.000Z","modifiedAt":"2026-11-20T13:00:02.890Z"}