PYSEC-2025-242

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/fastapi-guard/PYSEC-2025-242.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2025-242
Aliases
Published
2025-05-06T15:16:02.217Z
Modified
2026-07-13T07:15:25.026826105Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

PyPI / fastapi-guard

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.0

Affected versions

0.*
0.1.0
0.2.0
0.3.2
0.3.3
0.3.4
0.4.0
1.*
1.0.0
1.1.0
1.2.0
1.2.1
1.2.2
1.3.2
1.4.0
1.5.0

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/fastapi-guard/PYSEC-2025-242.yaml"