{"cve":"CVE-2025-59152","nvd":{"published":"2025-10-06T16:15:34.193","modified":"2026-10-19T16:10:00.260","status":"Deferred","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-807"],"references":["https://github.com/litestar-org/litestar/blob/26f20ac6c52de2b4bf81161f7560c8bb4af6f382/litestar/middleware/rate_limit.py#L127","https://github.com/litestar-org/litestar/commit/42a89e043e50b515f8548a93954fe143f63cf9fb","https://github.com/litestar-org/litestar/security/advisories/GHSA-hm36-ffrh-c77c"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:11:26.888974865+00:00"},"epss":{"cve":"CVE-2025-59152","score":0.00485,"percentile":0.41461,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-hm36-ffrh-c77c","url":"https://osv.dev/vulnerability/GHSA-hm36-ffrh-c77c","summary":"Litestar X-Forwarded-For Header Spoofing Vulnerability Enables Rate Limit Evasion","modified":"2026-07-07T17:56:38.135851735Z","packages":[{"ecosystem":"PyPI","name":"litestar","purl":"pkg:pypi/litestar","ranges":[">=2.17.0 <2.18.0"],"fixed":["2.18.0"]}]},{"id":"PYSEC-2026-1553","url":"https://osv.dev/vulnerability/PYSEC-2026-1553","summary":"Litestar X-Forwarded-For Header Spoofing Vulnerability Enables Rate Limit Evasion","modified":"2026-07-07T17:47:30.207767548Z","packages":[{"ecosystem":"PyPI","name":"litestar","purl":"pkg:pypi/litestar","ranges":[">=2.17.0 <2.18.0"],"fixed":["2.18.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}