CVE-2025-54365 Details
Description
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.
A vulnerability in FastAPI Guard version 3.0.1 allows for Regular Expression Denial-of-Service (ReDoS) attacks. The issue arises because the patch intended to limit input length and prevent ReDoS does not effectively catch all cases, particularly those involving script tag attributes. This oversight allows attackers to bypass most regex patterns, potentially leading to exploitation of the application.
Users can upgrade to FastAPI Guard version 3.0.2, which addresses this vulnerability by enhancing the regex length limitations to prevent bypasses.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 24, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1333 | Inefficient Regular Expression Complexity | [email protected] |
| CWE-185 | Incorrect Regular Expression | [email protected] |
| CWE-20 | Improper Input Validation | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| fastapi-guard fastapi guard | 3.0.1 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 9, 2025 | Initial Analysis | [email protected] |
| Jul 24, 2025 | CVE Modified | CISA-ADP |
| Jul 23, 2025 | New CVE Received | [email protected] |