The vulnerability lies in the authorize endpoint, specifically in the parseAuthRequest method of the OAuthHelpersImpl class. The patch adds a check to validate the redirect_uri against the client's registered redirect URIs. Before this patch, this check was missing, allowing an attacker to specify a malicious redirect_uri and potentially steal credentials. The parseAuthRequest function is responsible for parsing and validating the authorization request parameters, including the redirect_uri. Therefore, it is the primary vulnerable function. The changes in the test file __tests__/oauth-provider.test.ts confirm this by adding a test case (should reject authorization request with invalid redirect URI) that specifically targets this missing validation in the authorization flow, which calls parseAuthRequest internally via the fetch method of OAuthProvider when the path matches the authorizeEndpoint (e.g. /authorize).
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @cloudflare/workers-oauth-provider | npm | < 0.0.5 | 0.0.5 |
A Semantic Attack on Google Gemini - Read the Latest Research