Skip to main content
VulnerabilityPublished Updated

Tokio rate limit: gRPC `IpKeyExtractor` keys on client-supplied forwarding headers

Affects tokio-rate-limitSource GCVE Database

0

CVSS 5.3 Medium : upgrade to 0.11.1 when convenient.

Data as of 20 Nov 2026, 13:42 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.11.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What to do

Upgrade tokio-rate-limit to 0.11.1.

Affected software

ProductAffectedFixed in
crates.iotokio-rate-limitpkg:cargo/tokio-rate-limitOther threatsAffected
  • >=0.5.0 <0.11.1
Fixed in
  • 0.11.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in version 0.11.1, which fixes the issue by using server-supplied connection information and ignoring untrusted forwarding headers by default. Deployments behind trusted proxies can use the new `ForwardedIpKeyExtractor` to safely handle forwarding headers. If upgrading is not possible, users should implement a custom key extractor that reads the verified peer IP from tonic's connection info and rejects requests without verified peer addresses. Alternatively, restrict backend access to trusted proxies that strip all incoming `x-forwarded-for` and `x-real-ip` headers and set a single verified `x-forwarded-for` header per request.

Description

The Tokio rate limit vulnerability involves the `tonic_middleware::IpKeyExtractor` component, which is intended to rate limit gRPC requests by client IP address. However, in versions 0.5.0 through 0.11.0, it relies on client-supplied `x-forwarded-for` and `x-real-ip` headers to determine the client IP, allowing attackers to bypass per-IP rate limits by manipulating these headers. Version 0.11.1 fixes this by using server-supplied connection information instead of untrusted headers. Deployments behind trusted proxies can opt-in to a new extractor that safely reads forwarding headers. Without upgrading, mitigations include using a custom key extractor or restricting backend access to trusted proxies that sanitize forwarding headers.

References

Community reviews

Loading reviews…