Open Redirect in OAuth authorize endpoint via unvalidated error redirects
Description
The OAuth authorize endpoint built its error redirect from the request's redirect_uri before checking that the application had registered it, for an unknown client, an inactive application or an unsupported response_type. Anyone could craft a link to the platform that sent a signed-in user on to a site of the attacker's choosing. Upgrade to v0.10.0 or later.
Impact
Anyone could craft a link on the platform's own domain that redirected a signed-in user to an attacker-controlled site, which could then present a lookalike consent or sign-in page to harvest credentials. The redirect started from the platform's domain, which made the phishing more convincing.
Fix
Fixed in AutoGPT Platform v0.10.0.
POST /api/oauth/authorize now refuses an unknown or inactive client, or an unregistered redirect_uri, with a 400 error before any other check, and returns no redirect. Errors found after the redirect URI checks out still go back to the registered URI, as RFC 6749 §4.1.2.1 asks.
Fix: #15057.
Fix evidence: 413807bf22fe.
Upgrade to v0.10.0 or later. Version numbers in this advisory identify Platform releases, whose Git tags are autogpt-platform-beta-v<VERSION>, rather than the backend Python package version. The significantgravitas/autogpt Docker image is tagged v<VERSION>.
Workarounds
None.
---
Details
The OAuth authorization endpoint (/api/oauth/authorize, autogpt_platform/backend/backend/api/features/oauth.py) built error redirect URLs from the user-supplied request.redirect_uri before validating it against the application's registered redirect URIs. _error_redirect_url() was called with the unvalidated value in three early-exit paths:
- when
response_typewas not"code"; - when the
client_idwas unknown and no application was found; - when the application was inactive.
validate_redirect_uri() ran only after those three branches, although the code's own comment at that point said an invalid redirect_uri could not be redirected to safely, and _error_redirect_url() concatenated the user-supplied URI into the redirect URL directly. The consent page then followed the returned redirect_url. RFC 6749 §4.1.2.1 says the server must not redirect automatically when the client identity cannot be verified.
Proof of concept
POST /api/oauth/authorize HTTP/1.1
Host: <autogpt-instance>
Content-Type: application/x-www-form-urlencoded
redirect_uri=https://evil.com/phishing&client_id=invalid_client_id&response_type=token&state=xyzThe server responds with a JSON body containing:
{
"redirect_url": "https://evil.com/phishing?error=unsupported_response_type&error_description=Only+%27code%27+response+type+is+supported&state=xyz"
}If the frontend uses this redirect_url for a client-side redirect (window.location = data.redirect_url), the victim is sent to evil.com.
References
- Fix: #15057, commit 413807bf22fe, first released in v0.10.0
Timeline
Reported 2026-08-06 · Triaged 2026-09-07 · Fixed 2026-10-25 · Published 2026-11-17.