CVE-2025-54365Fastapi-guard Fastapi Guard
High 7.8 No auth needed
Follow: this CVE · Fastapi-guard · Fastapi-guard Fastapi Guard We alert you by email or Slack (account required).
- Priority
- 62
- CVSS 4.0
- 7.8
- EPSS
- —
- Auth required
- No
- Published
- Jul 23, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
fastapi-guard is a security library for FastAPI that provides middleware to control IPs, log requests, detect penetration attempts and more. In version 3.0.1, the regular expression patched to mitigate the ReDoS vulnerability by limiting the length of string fails to catch inputs that exceed this limit. This type of patch fails to detect cases in which the string representing the attributes of a <script> tag exceeds 100 characters. As a result, most of the regex patterns present in version 3.0.1 can be bypassed. This is fixed in version 3.0.2.
What to do
- Apply the vendor's security update for Fastapi Guard.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | fastapi-guard |
≥ 3.0.1 < 3.0.2 |
3.0.2 |
pip install "fastapi-guard>=3.0.2" |
| PyPI | fastapi-guard |
≥ 3.0.1 < 3.0.2 |
3.0.2 |
pip install "fastapi-guard>=3.0.2" |
Per OSV / GitHub Advisories (GHSA-rrf6-pxg8-684g, PYSEC-2026-1360). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastapi-guard | fastapi_guard | 3.0.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Patch
- github.com Exploit Vendor Advisory