Information ExposureWeakness · CWE-200

CVE-2026-54603

HIGH · 8.6 CVSS v3.1 Published 2026-07-28
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
95/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click 3 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The OAuth2 Ruby gem (versions 0.4.0 to 2.0.21) contains a vulnerability in the Client#request method where protocol-relative redirect URLs (e.g., //malicious.com/oauth/callback) override the original request's authority. When the client follows this redirect, it sends the bearer Authorization header to the attacker-controlled host, resulting in OAuth credential leakage.

MitigationUpgrade the OAuth2 Ruby gem to version 2.0.22 or later to remediate the unsafe redirect handling. Review application logs for signs of unauthorized redirect following prior to the upgrade.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify oauth2 gem version
    Run `gem list oauth2` or inspect your Gemfile.lock for the oauth2 gem version entry
    Affected if The version listed is 0.4.0 through 2.0.21 (inclusive)
  2. Verify OAuth2 client redirect usage
    Search your codebase for calls to OAuth2::Client#token_request or any method that processes redirect responses from OAuth providers (e.g., code that follows Location headers)
    Affected if Your application makes OAuth requests and processes redirects from the authorization server
  3. Inspect token request configuration
    Review your OAuth2 client initialization code to confirm the :token_method is set to :post and :token_params includes :headers or :authenticate_headers
    Affected if Your OAuth client is configured to send bearer tokens (Authorization header) during token exchange
  4. Check redirect handling behavior
    Examine how your application handles HTTP redirects from the OAuth provider by reviewing Net::HTTP follow_redirect behavior or similar redirect handling code
    Affected if Your application automatically follows redirects and forwards headers to the redirected location

You are affected if the oauth2 gem version is between 0.4.0 and 2.0.21 and your application makes OAuth token requests that can encounter protocol-relative redirects from the OAuth provider.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade the OAuth2 Ruby gem to version 2.0.22 or later to remediate the unsafe redirect handling. Review application logs for signs of unauthorized redirect following prior to the upgrade.

Recommended fix Moderate confidence

oauth2 gem version 2.0.22

  1. Check current oauth2 gem version in your project (gem list oauth2 or check Gemfile.lock)
  2. Update the oauth2 gem to version 2.0.22 or later
  3. Run bundle update oauth2 to apply the change
  4. Verify the update was successful by checking the installed version
  5. Test your OAuth2 authentication flow to ensure the redirect handling works correctly

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing4.0 h
  • Review / QA2.0 h
10.0 hours of engineering $1,720
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,752.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-54603 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-54603 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data