Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litestar
  4. ›
  5. CVE-2025-59152

CVE-2025-59152: Litestar X-Forwarded-For Header Spoofing Vulnerability Enables Rate Limit Evasion

October 6, 2025 (updated October 13, 2025)

While testing Litestar’s RateLimitMiddleware, I discovered that rate limits can be completely bypassed by manipulating the X-Forwarded-For header. This renders IP-based rate limiting ineffective against determined attackers.

References

  • github.com/advisories/GHSA-hm36-ffrh-c77c
  • github.com/litestar-org/litestar
  • github.com/litestar-org/litestar/blob/26f20ac6c52de2b4bf81161f7560c8bb4af6f382/litestar/middleware/rate_limit.py
  • github.com/litestar-org/litestar/commit/42a89e043e50b515f8548a93954fe143f63cf9fb
  • github.com/litestar-org/litestar/security/advisories/GHSA-hm36-ffrh-c77c
  • nvd.nist.gov/vuln/detail/CVE-2025-59152

Code Behaviors & Features

Detect and mitigate CVE-2025-59152 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.17.0 before 2.18.0, version 2.17.0

Fixed versions

  • 2.18.0

Solution

Upgrade to version 2.18.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-807: Reliance on Untrusted Inputs in a Security Decision

Source file

pypi/litestar/CVE-2025-59152.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Oct 2025 00:18:54 +0000.