OAuth2 Gem Vulnerability: Bearer Token Leak via Protocol-Relative Redirect
An issue has been reported in the OAuth2 gem <=2.0.21 where the OAuth2::Client#request method may leak bearer tokens to an attacker host when a protocol-relative redirect is used.
What happened
An early warning has been issued regarding a potential vulnerability in the OAuth2 gem, specifically affecting versions up to and including 2.0.21. The issue reportedly involves the OAuth2::Client#request method, which may leak bearer tokens to an attacker host when a protocol-relative redirect is utilized. This vulnerability is under investigation, and it is recommended that users of the affected versions upgrade to a fixed version of the gem or apply a workaround if immediate upgrade is not feasible. For more detailed information, primary sources should be consulted.
How 0Day mitigates this
oauth2 is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.