fastapi-guard patch contains bypassable RegEx
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · Low · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-1333.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rennf93 | fastapi-guard | 3.0.1 to before 3.0.2 | 3.0.2 | Patch available | CNA |
| — | fastapi-guard (PyPI) | 3.0.1 to before 3.0.2 | 3.0.2 | Patch available | GHSA-rrf6-pxg8-684g |
- fastapi-guard Vendorrennf93 Affected 3.0.1 to before 3.0.2 Fixed in 3.0.2 Patch available CNA
- fastapi-guard (PyPI) Vendor— Affected 3.0.1 to before 3.0.2 Fixed in 3.0.2 Patch available GHSA-rrf6-pxg8-684g
Remediation
- Fix · CNA fastapi-guard (rennf93) Fixed in 3.0.2
- Fix · GHSA-rrf6-pxg8-684g fastapi-guard (PyPI) Fixed in 3.0.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-54365
- 2026-10-03 Alias added: GHSA-rrf6-pxg8-684g
References
Patch 2
More rennf93 Fastapi Guard vulnerabilities
- TI-2025-29447 FastAPI Guard Remote Header Injection via X-Forwarded-For Manipulation CVSS 3.1HIGH 7.5
- TI-2025-33483 ReDoS in fastapi-guard's penetration attempts detector CVSS 4.0MEDIUM 6.9
Sources
- CVE-2025-54365 · CVE Program
- CVE-2025-54365 · NVD
- FIRST EPSS
- GHSA-rrf6-pxg8-684g · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences