CVE-2025-61673: Python Fastapi Auth Header Fail Open

The middleware conditionally validates the 'Authorization' header only if it is present and formatted correctly, but falls through to request processing if it is absent or malformed. If this endpoint is meant to be protected, an attacker can bypass authentication by omitting the header. Ensure that the presence and validity of the Authorization header is enf

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2025-61673-python-fastapi-auth-header-fail-open --engine opengrep

Description

The middleware conditionally validates the 'Authorization' header only if it is present and formatted correctly, but falls through to request processing if it is absent or malformed. If this endpoint is meant to be protected, an attacker can bypass authentication by omitting the header. Ensure that the presence and validity of the Authorization header is enf