Intel

AIKIDO-2026-11103

oauth2 is vulnerable to Exposure of Sensitive Information

CVE-2026-54603Published Jun 8, 2026
June 8, 2026

86

CVE Score

High

Exposure of Sensitive Information

Are you affected? Scan for Free

TL;DR

The OAuth2::Client#request method resolves HTTP 30x redirect Location headers with URI#merge and re-issues the request without revalidating the target host or pruning credentials. A protocol-relative location such as //attacker.example/leak is treated as a network-path reference that replaces the original authority, so the follow-up request is sent to an attacker-controlled host while still carrying the Authorization: Bearer header configured for the trusted identity provider. This discloses the bearer token cross-origin with no user interaction, exploitable via IdP open redirects, hostile multi-tenant configurations, or a network-position attacker rewriting response headers. The fix neutralizes protocol-relative locations before merging and strips Authorization headers when a redirect changes scheme, host, or port.

How do I fix this?

Upgrade the oauth2 library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Package

Versions

0.4.0 - 2.0.21

Fixed in 2.0.22

Background info

oauth2 is vulnerable to Exposure of Sensitive Information in versions 0.4.0 - 2.0.21.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea