Third Party Services Takeover using Oauth Misconfiguration
The third-party OAuth provider did not properly validate the redirect_uri, so an attacker could send a crafted authorisation link and receive the victim's OAuth authorisation code on their own server. The attacker could then submit that code to the rewards platform's link-account endpoint and bind the victim's fitness account to the attacker's rewards account, allowing them to view and manage the victim's bookings.
infosecwriteups.com
Published on infosecwriteups.com
Today, I am going to write about my recently fixed bug which belongs to private program. The main concept of the program is about rewards points (reward currency).
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 third-party OAuth client accepted an attacker-supplied redirect_uri instead of only allowing pre-registered values.
Impact
The attacker could view and manage the victim's fitness class bookings on the victim's behalf.
What the attacker needed
Victim clicks a crafted OAuth link; victim completes the OAuth flow; attacker has a rewards account
How it was found
- The attacker sends the victim a crafted OAuth authorisation link whose redirect_uri points to the attacker's server.
- The victim starts the OAuth flow and the third-party site accepts the attacker-supplied redirect_uri.
- After the victim completes the flow, the authorisation code is delivered to the attacker's server.
- The attacker logs into their own rewards account and intercepts an API request.
- The attacker replaces the request body with the victim's authorisation code and the attacker's redirect URI.
- The victim's third-party fitness account becomes linked to the attacker's rewards account.
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 a way for one website to ask another website for permission to access your account there, without sharing your password. When the other site sends you back, it includes a short-lived code that proves you agreed. If that return address is not checked, an attacker can make the code come to their own server and then use it to link your account to theirs.
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.