CVE-2026-54603
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 · uneditedOAuth2 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 confidenceThe 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Identify oauth2 gem versionRun `gem list oauth2` or inspect your Gemfile.lock for the oauth2 gem version entryAffected if The version listed is 0.4.0 through 2.0.21 (inclusive)
-
Verify OAuth2 client redirect usageSearch 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
-
Inspect token request configurationReview your OAuth2 client initialization code to confirm the :token_method is set to :post and :token_params includes :headers or :authenticate_headersAffected if Your OAuth client is configured to send bearer tokens (Authorization header) during token exchange
-
Check redirect handling behaviorExamine how your application handles HTTP redirects from the OAuth provider by reviewing Net::HTTP follow_redirect behavior or similar redirect handling codeAffected 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.
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 · scopedUpgrade 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.
oauth2 gem version 2.0.22
- Check current oauth2 gem version in your project (gem list oauth2 or check Gemfile.lock)
- Update the oauth2 gem to version 2.0.22 or later
- Run bundle update oauth2 to apply the change
- Verify the update was successful by checking the installed version
- Test your OAuth2 authentication flow to ensure the redirect handling works correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing4.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-54603 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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