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.
Published: 2026-07-28
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

OAuth2::Client#request has a flaw where a protocol-relative redirect Location can override the request authority, causing the bearer Authorization header to be sent to an attacker-controlled host. This leak exposes the OAuth bearer token, allowing an attacker to impersonate the user and access protected resources. The weakness involves improper input handling and open redirect behavior, aligning with CWE-200 and CWE-601.

Affected Systems

The vulnerability affects the ruby-oauth OAuth2 gem in all releases from 0.4.0 through 2.0.21. Users deploying any of these versions should verify their gem version and consider an upgrade.

Risk and Exploitability

With a CVSS score of 8.6 the vulnerability is considered high severity, yet the EPSS score of < 1% indicates the likelihood of exploitation is very low at the present moment. It is not listed in CISA's KEV catalog. The attack would require an application to issue a redirect response that the attacker can control or influence, targeting the redirected host that receives the leaked Authorization header.

Generated by OpenCVE AI on August 3, 2026 at 14:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the ruby-oauth OAuth2 gem to version 2.0.22 or later, which contains the official fix.
  • Ensure that any redirects performed by the application validate the redirect URL’s authority against a whitelist of trusted hosts before sending the Authorization header.
  • Continuously monitor OAuth traffic for unexpected redirect destinations and alert on anomalous patterns.

Generated by OpenCVE AI on August 3, 2026 at 14:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-pp92-crg2-gfv9 OAuth2::Client#request: Protocol-relative redirect Location overrides authority, leaking bearer Authorization to attacker host
History

Wed, 29 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Ruby-oauth
Ruby-oauth oauth2
Vendors & Products Ruby-oauth
Ruby-oauth oauth2

Tue, 28 Jul 2026 17:00:00 +0000

Type Values Removed Values Added
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.
Title OAuth2::Client#request: Protocol-relative redirect Location overrides authority, leaking bearer Authorization to attacker host
Weaknesses CWE-200
CWE-601
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'}


Subscriptions

Ruby-oauth Oauth2
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T13:52:49.325Z

Reserved: 2026-06-15T19:45:23.540Z

Link: CVE-2026-54603

cve-icon Vulnrichment

Updated: 2026-07-29T13:52:24.483Z

cve-icon NVD

Status : Received

Published: 2026-07-28T17:16:52.227

Modified: 2026-07-29T14:16:31.080

Link: CVE-2026-54603

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T15:00:15Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')