RUSTSEC-2026-0584 (GHSA-R5C9-R265-CCG3)

Vulnerability from osv_rustsec – Published: 2026-11-19 12:00 – Updated: 2026-11-20 12:47 – Source website
VLAI
Summary
gRPC `IpKeyExtractor` keys on client-supplied forwarding headers
Details

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 using its built-in TLS), without ever reading forwarding headers. Deployments behind a trusted proxy can use the new opt-in ForwardedIpKeyExtractor, which reads a single configured header (x-forwarded-for or x-real-ip) and is only correct when that proxy sets the header as documented.

If you cannot upgrade to 0.11.1, use a custom key extractor that reads the peer IP from tonic's connection information for the transport in use (including TLS) and rejects requests without a verified peer address before invoking the limiter, or restrict backend access to a trusted proxy that strips all incoming x-forwarded-for and x-real-ip fields and sets one x-forwarded-for value to the verified client IP on every request.

Impacted products
Ecosystem Package Version
crates.io tokio-rate-limit
pkg:cargo/tokio-rate-limit
Affected: ≥ 0.5.0, < 0.11.1 (semver)

{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "denial-of-service"
        ],
        "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "tokio_rate_limit::tonic_middleware::IpKeyExtractor::extract"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "tokio-rate-limit",
        "purl": "pkg:cargo/tokio-rate-limit"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.5.0"
            },
            {
              "fixed": "0.11.1"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-r5c9-r265-ccg3"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "`tonic_middleware::IpKeyExtractor` is documented as rate limiting gRPC requests by client IP address,\nbut on a standard tonic server it keys on client-supplied `x-forwarded-for` and `x-real-ip`\nheaders. In 0.5.0\u20130.9.1, the extractor reads those headers directly; in 0.10.0\u20130.11.0, it first\nchecks for a bare `std::net::SocketAddr` request extension\u2014which `tonic::transport::Server` never\nsupplies, as it provides `TcpConnectInfo` instead\u2014and falls back to the same headers. Direct\nclients can therefore choose their rate-limit key to bypass per-IP rate limits and increase the\nnumber of tracked keys; without forwarding headers, 0.5.0\u20130.9.1 allow requests without limiting\nthem and 0.10.0\u20130.11.0 reject them by default unless `.fail_open()` is enabled.\n\nApplications are affected if they use `GrpcRateLimitLayer` with `IpKeyExtractor` (the\n`tonic-support` feature). The HTTP middleware\u0027s `IpKeyExtractor` reads `ConnectInfo\u003cSocketAddr\u003e` and\nis not affected.\n\nVersion 0.11.1 fixes `IpKeyExtractor` to honor a server-supplied `SocketAddr` override first and then\nread the TCP peer address from tonic\u0027s `TcpConnectInfo` (which `tonic::transport::Server` attaches\nto plaintext connections and connections using its built-in TLS), without ever reading forwarding\nheaders. Deployments behind a trusted proxy can use the new opt-in `ForwardedIpKeyExtractor`, which\nreads a single configured header (`x-forwarded-for` or `x-real-ip`) and is only correct when that\nproxy sets the header as documented.\n\nIf you cannot upgrade to 0.11.1, use a custom key extractor that reads the peer IP from tonic\u0027s\nconnection information for the transport in use (including TLS) and rejects requests without a\nverified peer address before invoking the limiter, or restrict backend access to a trusted proxy\nthat strips all incoming `x-forwarded-for` and `x-real-ip` fields and sets one `x-forwarded-for`\nvalue to the verified client IP on every request.",
  "id": "RUSTSEC-2026-0584",
  "modified": "2026-11-20T12:47:55Z",
  "published": "2026-11-19T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/tokio-rate-limit"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0584.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sadco-io/tokio-rate-limit/releases/tag/v0.11.1"
    }
  ],
  "related": [],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "gRPC `IpKeyExtractor` keys on client-supplied forwarding headers"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.