CVE-2025-54365: rennf93 fastapi-guard · Improper Input Validation
Affects rennf93 fastapi-guardSource CVE Database V5
Not known to be exploited · CVSS 7.8 High · fixed in 3.0.2 : patch rennf93 fastapi-guard soon.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.8% chance of exploitation in 30 days – higher than 58% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.0.2
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:PExploitation evidence
Disclosed: evidence found.
CVE published 23 Jul 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIfastapi-guardpkg:pypi/fastapi-guardOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should immediately upgrade fastapi-guard to version 3.0.2 or later, where the vulnerability is fixed. Until upgrade is possible, organizations should implement additional input validation and sanitization at the application level, specifically targeting long attribute strings in HTML tags such as <script>. Employing Web Application Firewalls (WAFs) with custom rules to detect and block unusually long or suspicious input patterns can provide a temporary defense. Monitoring and logging should be enhanced to detect anomalous request patterns indicative of exploitation attempts. Security teams should conduct code reviews and penetration testing focused on input validation bypass scenarios. Furthermore, organizations should ensure that their incident response plans include procedures for handling potential exploitation of this vulnerability. Finally, developers should be educated about the limitations of regex-based input validation and encouraged to adopt defense-in-depth strategies.
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.