Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade oauth2 to version 2.0.22 or higher.
Affected versions of this package are vulnerable to Unprotected Transport of Credentials in the request() function in client.rb, which exposes the Authorization: Bearer value. An attacker in control of a malicious endpoint that is the target of redirects can supply a Location header in a redirect response that uses a protocol-relative URI (starting with //), to obtain the authorization token when a user sends a request. This is caused by an unprotected URI#merge() operation.