CVE-2025-54365
HIGH 7.8CVSS 4.0FastAPI Guard has a regex bypass
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.
- Published
- 23 Jul 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1333CWE-185CWE-20
- Also known as
- GHSA-rrf6-pxg8-684gPYSEC-2026-1360
- Sources
- NVDJSONOSV GHSA-rrf6-pxg8-684gJSONOSV PYSEC-2026-1360JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 7.8 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| OSV | PyPA | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fastapi-guard | fastapi_guardcpe:2.3:a:fastapi-guard:fastapi_guard:3.0.1:*:*:*:*:*:*:* |
= 3.0.1 | |
| OSV | PyPI | fastapi-guard | >= 3.0.1, < 3.0.2 | 3.0.2 |
References
- https://github.com/rennf93/fastapi-guard/commit/0829292c322d33dc14ab00c5451c5c138148035a · Patch, WEB
- https://github.com/rennf93/fastapi-guard/commit/d9d50e8130b7b434cdc1b001b8cfd03a06729f7f · Patch, WEB
- https://github.com/rennf93/fastapi-guard/security/advisories/GHSA-rrf6-pxg8-684g · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-54365 · ADVISORY
- https://github.com/rennf93/fastapi-guard · PACKAGE
- https://pypi.org/project/fastapi-guard · PACKAGE
- https://github.com/advisories/GHSA-rrf6-pxg8-684g · ADVISORY
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 23 Jul 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 23 Jul 2025)