X-Forwarded-For Header Spoofing Bypasses Litestar Rate Limiting
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| litestar-org | litestar | affected |
|
No data.
No data.
| Vendor | Product | Versions |
|---|---|---|
| Litestar-org | Litestar | — |
| Source | ID | Title |
|---|---|---|
EUVD |
EUVD-2025-32539 | Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In version 2.17.0, rate limits can be completely bypassed by manipulating the X-Forwarded-For header. This renders IP-based rate limiting ineffective against determined attackers. Litestar's RateLimitMiddleware uses `cache_key_from_request()` to generate cache keys for rate limiting. When an X-Forwarded-For header is present, the middleware trusts it unconditionally and uses its value as part of the client identifier. Since clients can set arbitrary X-Forwarded-For values, each different spoofed IP creates a separate rate limit bucket. An attacker can rotate through different header values to avoid hitting any single bucket's limit. This affects any Litestar application using RateLimitMiddleware with default settings, which likely includes most applications that implement rate limiting. Version 2.18.0 contains a patch for the vulnerability. |
Github GHSA |
GHSA-hm36-ffrh-c77c | Litestar X-Forwarded-For Header Spoofing Vulnerability Enables Rate Limit Evasion |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.485% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Litestar-org
Litestar-org litestar |
|
| Vendors & Products |
Litestar-org
Litestar-org litestar |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. In version 2.17.0, rate limits can be completely bypassed by manipulating the X-Forwarded-For header. This renders IP-based rate limiting ineffective against determined attackers. Litestar's RateLimitMiddleware uses `cache_key_from_request()` to generate cache keys for rate limiting. When an X-Forwarded-For header is present, the middleware trusts it unconditionally and uses its value as part of the client identifier. Since clients can set arbitrary X-Forwarded-For values, each different spoofed IP creates a separate rate limit bucket. An attacker can rotate through different header values to avoid hitting any single bucket's limit. This affects any Litestar application using RateLimitMiddleware with default settings, which likely includes most applications that implement rate limiting. Version 2.18.0 contains a patch for the vulnerability. | |
| Title | X-Forwarded-For Header Spoofing Bypasses Litestar Rate Limiting | |
| Weaknesses | CWE-807 | |
| References |
| |
| Metrics |
cvssV3_1
|