CVE-2025-46814: PYSEC-2025-242 - FastAPI Guard is a security library for FastAPI that provides middleware to control IPs, log…

CVE-2025-46814 · Severity: low · CVSS 3.1 · Published 2025-05-06

FastAPI Guard is a security library for FastAPI that provides middleware to control IPs, log requests, and detect penetration attempts. An HTTP header injection vulnerability has been identified in versions prior to 2.0.0. By manipulating the X-Forwarded-For header, an attacker can potentially inject arbitrary IP addresses into the request. This vulnerability can allow attackers to bypass IP-based access controls, mislead logging systems, and impersonate trusted clients. It is especially impactful when the application relies on the X-Forwarded-For header for IP-based authorization or authentication. Users should upgrade to FastAPI Guard version 2.0.0 to receive a fix.

Technologies: fastapi-guard (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2025-46814 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-46814 being exploited in the wild.
How severe is CVE-2025-46814?
Low severity, with a CVSS score of 3.1, published 6 May 2025.
Which products and versions are affected?
fastapi-guard (PyPI) ECOSYSTEM:introduced=0,fixed=2.0.0.
Is there a fix for CVE-2025-46814?
Yes. fastapi-guard (PyPI): upgrade to 2.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2025-46814?
Check whether you run fastapi-guard (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • fastapi-guard (PyPI): upgrade to 2.0.0 or later
    pip install "fastapi-guard>=2.0.0"

Affected products

  • fastapi-guard (PyPI) ECOSYSTEM:introduced=0,fixed=2.0.0

Identifiers

  • CVE-2025-46814
  • PYSEC-2025-242

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.