Inefficient Regex Patterns in FastAPI Guard Security Library
CVE-2025-53539
6.9MEDIUM
What is CVE-2025-53539?
FastAPI Guard, a middleware security library for FastAPI applications, has a vulnerability stemming from inefficient regex patterns used for detecting penetration attempts. These inefficient patterns can lead to significant performance issues, particularly when processing specially crafted inputs, as they may cause polynomial complexity backtracks. This could allow attackers to exploit the library by sending crafted requests that could stall or degrade the application’s performance. To mitigate this issue, an update has been made in version 3.0.1, which addresses the regex inefficiencies.
Affected Version(s)
fastapi-guard < 3.0.1