fastapi-guard is vulnerable to Improper Access Control
65
Medium Risk
The Starlette and WebSocket request adapters return the full request path including any ASGI root_path or mount prefix. guard-core matches that value as an exact dict key against path-keyed controls such as exclude_paths and endpoint_rate_limits and passes it to custom request-check hooks, so under a mounted sub-application or a configured root_path those keys never match and the controls silently stop applying. Per-endpoint rate limits and path exclusions therefore provide no protection while the configuration reports them as active. The fix resolves the route-relative path with Starlette's get_route_path so the controls match the same path the router uses.
You are affected if you are using a version that falls within the vulnerable range and you serve the application under an ASGI root_path or a mounted sub-application while relying on path-keyed controls such as exclude_paths, endpoint_rate_limits, or custom_request_check hooks.
fastapi-guard is vulnerable to Improper Access Control in versions 0.0.1 - 7.8.1.
Upgrade the fastapi-guard library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.