oauth2 Gem <=2.0.21 Vulnerability: Bearer Token Leak Risk
The OAuth2::Client#request method in the oauth2 gem <=2.0.21 reportedly leaks bearer Authorization tokens to attacker hosts when a protocol-relative redirect Location header is used. This issue is under investigation.
What happened
An early warning has been issued regarding a vulnerability in the oauth2 gem, specifically affecting versions <=2.0.21. The OAuth2::Client#request method appears to leak bearer Authorization tokens to attacker hosts when a protocol-relative redirect Location header is utilized. This issue is currently under investigation. To assess your exposure, check if your application uses the oauth2 gem version <=2.0.21 and if it handles protocol-relative redirects. It is recommended to upgrade to a fixed version of the oauth2 gem or apply a workaround if immediate upgrade is not feasible. For more details, consult the primary sources.
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.