CVE-2025-54365

HIGH
Published Jul 23, 2025 Modified Oct 9, 2025 CWE-20 CWE-185 CWE-1333

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.

CVSS v3.1 Score

7.5
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness Type (CWE)

CWE-20 Improper Input Validation
CWE-185 CWE-185
CWE-1333 CWE-1333

Affected Products

Vendor Product
fastapi-guard fastapi_guard

References

Frequently Asked Questions

What is CVE-2025-54365? +
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. It has a CVSS v3.1 base score of 7.5 (HIGH).
How severe is CVE-2025-54365? +
CVE-2025-54365 has a CVSS v3.1 score of 7.5 out of 10, rated HIGH. This is a high-severity vulnerability that should be prioritized for patching.
What products are affected by CVE-2025-54365? +
CVE-2025-54365 affects products from fastapi-guard, specifically: fastapi_guard. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2025-54365? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2025-54365 — free, no signup required.

Start Free Scan