Intel

AIKIDO-2026-39992

fastapi-guard is vulnerable to Improper Access Control

Improper Access ControlGHSA-q5f7-443m-w4rq Published Yesterday

65

Medium Risk

This Affects:

PYTHONfastapi-guard
0.0.1 - 7.8.1
Fixed in 7.8.2
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

fastapi-guard is vulnerable to Improper Access Control in versions 0.0.1 - 7.8.1.

How to fix this

Upgrade the fastapi-guard library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform