Advisory

GHSA-r95x-qfjj-fjj2

Details, part 2 of 2. The advisory

Details

Workarounds

No clean server-side workaround exists short of patching. Partial mitigations:

  • Unregister OpenIDImplicitGrant and OpenIDHybridGrant if the Implicit and Hybrid flows are not required. (RFC 9700 deprecates the Implicit flow and discourages Hybrid flows, so this is recommended anyway.)
  • Front the /authorize endpoint with a reverse proxy rule that rejects requests containing both a redirect_uri parameter and a scope that does not include openid when response_type matches the vulnerable set. This is fragile and not recommended as a primary control.

References

  • RFC 6749, §4.1.2.1 — Error Response (OAuth 2.0 authorization endpoint)
  • RFC 9700, §4.11 — Redirect URI validation
  • OpenID Connect Core 1.0, §3.2.2.6 / §3.3.2.6 — Authentication Error Response
  • Authlib commit `3be08468` — prior fix for the same class of issue in UnsupportedResponseTypeError (Authlib 1.6.10)
  • Authlib source (by symbol; verified in commit 5d2e603e):
  • OpenIDImplicitGrant.validate_authorization_request — authlib/oidc/core/grants/implicit.py
  • OpenIDHybridGrant.validate_authorization_request — authlib/oidc/core/grants/hybrid.py
  • OAuth2Error.__call__ — authlib/oauth2/base.py (renders errors with redirect_uri as HTTP 302)
  • AuthorizationEndpointMixin.validate_authorization_redirect_uri — authlib/oauth2/rfc6749/grants/base.py (the validation that is bypassed)

Sources & licences