Skip to main content
VulnerabilityPublished

CVE-2025-59152: litestar · Reliance on Untrusted Inputs in a Security Decision

Affects litestarSource CVE Database V5

0

Not known to be exploited · CVSS 7.5 High.

Data as of 26 Oct 2026, 15:59 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.4% chance of exploitation in 30 days – higher than 41% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 6 Oct 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
litestar-org litestarAffected
  • =2.17.0
Fixed in–

AI-suggested

European organizations should immediately upgrade Litestar to version 2.18.0 or later, which contains the patch for this vulnerability. Until the upgrade is applied, organizations should implement additional controls to validate or sanitize the X-Forwarded-For header before it is used for rate limiting. This can include configuring middleware to trust only headers from known and secure proxies or load balancers, ignoring client-supplied X-Forwarded-For headers from untrusted sources, or using alternative client identification methods such as authenticated tokens or cookies. Network-level protections like Web Application Firewalls (WAFs) can be configured to detect and block suspicious header manipulation or IP rotation patterns. Monitoring and alerting on unusual request rates or header anomalies can help detect exploitation attempts early. Additionally, consider implementing rate limiting based on multiple factors (e.g., user accounts, API keys) rather than solely on IP addresses. Conduct thorough testing after applying patches or configuration changes to ensure rate limiting functions as intended without introducing regressions.

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.

References

Community reviews

Loading reviews…