One-Click Full Account Takeover: How an Unauthenticated OAuth End
The OAuth Dynamic Client Registration endpoint accepted unauthenticated registrations with arbitrary redirect URIs, client names and logos, allowing an attacker to create a convincing consent screen on the provider's real domain. A victim who authorised it would send a read+write authorization code to the attacker, who could exchange it for an access token and refresh token giving full account access.
I’m Mohamed Atef, known in the community as 0xlight. I’m a bug bounty hunter, co-founder of XTIP, a threat intelligence platform, and a cybersecurity student.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The Dynamic Client Registration endpoint performed no authentication and no validation of redirect URIs, client names or logos, so anyone could register a client that impersonates the provider and redirects codes to an attacker-controlled server.
Impact
Any user who authorises the malicious client suffers a full account takeover with read+write access and a persistent refresh token, though the report notes it was marked as a duplicate.
What the attacker needed
No account needed to register a client; victim clicks the crafted link; victim approves the consent screen
The fix
The registration endpoint should require authentication and validate redirect URIs (ownership, scheme, allowlist) and client metadata such as name and logo.
How it was found
- Send an unauthenticated registration request to the OAuth register endpoint with an attacker redirect URI, a provider-impersonating name and the provider's own logo.
- Receive a client_id immediately with HTTP 201 and no review.
- Build an authorize URL using that client_id, the attacker redirect URI and read+write scope.
- Have the victim visit the URL and click Authorize on the genuine-looking consent screen.
- Capture the authorization code sent to the attacker's callback server.
- Exchange the code at the token endpoint for an access token and refresh token, then call the production API with the token.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
OAuth is the 'Log in with X' system that lets an app ask a service for permission to act on your account. The service is supposed to check that the app really owns the web address it wants your login code sent to. Here it did not check anything, so an attacker could pretend to be the service itself and receive your login code.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.