CVE-2025-68158: Authlib Missing Scope Validation

OAuth2 endpoints are missing scope validation and default scope resolution. By omitting the scope parameter or providing an invalid one, an attacker can bypass scope checks. Ensure that requests validate the scope, resolve defaults via `client.get_allowed_scope()`, and verify the result is not `None`.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2025-68158-authlib-missing-scope-validation --engine opengrep

Description

OAuth2 endpoints are missing scope validation and default scope resolution. By omitting the scope parameter or providing an invalid one, an attacker can bypass scope checks. Ensure that requests validate the scope, resolve defaults via `client.get_allowed_scope()`, and verify the result is not `None`.