{"id":71048,"date":"2025-10-06T19:45:34","date_gmt":"2025-10-06T16:15:34","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-59152-x-forwarded-for-header-spoofing-bypasses-litestar-rate-limiting\/"},"modified":"2025-10-06T19:45:34","modified_gmt":"2025-10-06T16:15:34","slug":"cve-2025-59152-x-forwarded-for-header-spoofing-bypasses-litestar-rate-limiting","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-59152-x-forwarded-for-header-spoofing-bypasses-litestar-rate-limiting\/","title":{"rendered":"CVE-2025-59152 &#8211; X-Forwarded-For Header Spoofing Bypasses Litestar Rate Limiting"},"content":{"rendered":"<p>CVE ID : CVE-2025-59152<\/p>\n<p>Published :  Oct. 6, 2025, 4:15 p.m. | 18\u00a0minutes ago<\/p>\n<p>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&#8217;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&#8217;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.<\/p>\n<p>Severity: 7.5 | HIGH<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-59152 Published : Oct. 6, 2025, 4:15 p.m. | 18\u00a0minutes ago 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&#8217;s RateLimitMiddleware uses `cache_key_from_request()` to generate cache &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-71048","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=71048"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71048\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=71048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=71048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=71048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}