Advisory

GHSA-prq8-7wvh-44qh

Details, part 2 of 2. The advisory

Details

The fix intentionally preserves same-origin redirect compatibility while making
cross-origin token endpoint redirects an explicit choice. It also avoids placing
internal redirect state in request_options passed to OAuth signing.

Workarounds

Until a patched release is available, applications can reduce exposure by doing
one or more of the following:

  • Ensure configured OAuth token endpoints are fixed absolute URLs controlled by a trusted provider.
  • Do not use tenant-controlled OAuth token endpoint URLs unless the tenant is trusted to receive signed OAuth token requests.
  • Block outbound application-server traffic to internal metadata services and other sensitive internal addresses at the network layer.
  • Place a trusted proxy in front of OAuth providers that rejects token endpoint redirects to a different origin.

These mitigations reduce exploitability but do not remove the vulnerable redirect
logic from the gem.

Credit

Found during the follow-up audit for GHSA-pp92-crg2-gfv9.

Reporter/coordinator: Peter H. Boling (pboling).

References

  • Related OAuth 2 advisory: https://github.com/ruby-oauth/oauth2/security/advisories/GHSA-pp92-crg2-gfv9
  • Fixed version: oauth v1.1.6
  • Behavior-introducing commit: https://github.com/ruby-oauth/oauth/commit/d74b767f

Sources & licences