GHSA-r5c9-r265-ccg3: gRPC `IpKeyExtractor` keys on client-supplied forwarding headers
Published 2026-11-19 · Updated 2026-11-20 · Also known as RUSTSEC-2026-0584
Summary
The IpKeyExtractor in tokio-rate-limit incorrectly trusts client-supplied forwarding headers, allowing remote attackers to bypass rate limits. Users of the GrpcRateLimitLayer with the tonic-support feature should update to version 0.11.1.
Who is affected
Applications using GrpcRateLimitLayer with IpKeyExtractor are affected, as the component defaults to headers like x-forwarded-for or x-real-ip instead of the actual client IP. An attacker can manipulate these headers to choose their own rate-limit key, either bypassing limits or exhausting tracking resources. Versions 0.5.0 through 0.11.0 are susceptible to this logic flaw.
Exploitability
The vulnerability is remotely exploitable without authentication or user interaction. With a CVSS score of 5.3, it carries a moderate availability impact; CISA KEV data is not available, and exploitation status is unknown.
Remediation
- Upgrade the tokio-rate-limit crate to version 0.11.1 or later.
- If behind a trusted proxy, migrate to the new ForwardedIpKeyExtractor which requires explicit configuration.
- If an upgrade is not possible, implement a custom key extractor that extracts the peer IP from tonic connection information and strips untrusted forwarding headers.
How to check your project
- Inspect Cargo.toml or Cargo.lock files to check if the tokio-rate-limit dependency version falls within the 0.5.0 to 0.11.0 range.
- Verify usage of the GrpcRateLimitLayer component and the tonic-support feature within the codebase.
Automated analysis of the published advisory data, generated 2026-11-21. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| crates.io | tokio-rate-limit |
>= 0.5.0, < 0.11.1 | 0.11.1 | cargo update -p tokio-rate-limit --precise 0.11.1 |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | Low |
FAQ
Is the standard HTTP middleware for IpKeyExtractor affected?
No, the HTTP middleware reads ConnectInfo<SocketAddr> directly and remains unaffected.
What happens if I cannot upgrade immediately?
You can restrict backend access so that a trusted proxy strips all incoming forwarding headers and injects a single verified header value, or write a custom extractor that relies on tonic's internal connection information.
What is the primary difference in version 0.11.1?
Version 0.11.1 now prioritizes the server-supplied SocketAddr and reads the TCP peer address from tonic's TcpConnectInfo, removing the reliance on potentially malicious client-supplied headers.
Original advisory description
References
- PACKAGE https://crates.io/crates/tokio-rate-limit
- ADVISORY https://rustsec.org/advisories/RUSTSEC-2026-0584.html
- WEB https://github.com/sadco-io/tokio-rate-limit/releases/tag/v0.11.1
Source records: RUSTSEC-2026-0584 (OSV.dev).