Skip to content
OAuth / SSO Write-up Intermediate

Bug Bounty: Memanfaatkan webhook untuk mengambil token, uuid, sso

The OAuth login flow on the target accepted a redirect_uri pointing at an attacker-controlled webhook, so a victim's auth token, uuid and session cookie were sent to the attacker. The attacker then swapped those values into their own profile requests and viewed the victim's account details.

0xRedFox29 Follow

Published on medium.com

Di write up sederhana ini, saya menguji keamanan API OAuth pada platform X, saya menemukan sebuah bug kecil yang terasa tidak berbahaya: open redirect. Namun setelah saya perhatikan, open redirect ini ternyata dapat digabungkan dengan kesalahan konfigurasi OAuth untuk mencuri access token dan auth token.

0xRedFox29, on medium.com

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

Likely the OAuth flow did not strictly validate redirect_uri, allowing an arbitrary external URL to receive the token, and the earlier fix only patched the XSS without fixing the redirect and OAuth misconfiguration.

Impact

The attacker could take over the victim's account, view personal data, change email or password and manipulate transactions, though the report notes the earlier XSS was fixed while the redirect issue remained.

What the attacker needed

Two accounts on the auth service; victim logs in via the crafted link; attacker-controlled webhook endpoint

The fix

The callback URL should be validated strictly against a pre-registered allow-list, rejecting or sanitising any other URL.

How it was found

  1. Set up two browsers and two accounts registered on the auth service.
  2. Change the redirect target to a webhook endpoint to capture the auth token from the victim's subpath.
  3. Log in as the victim account using the modified redirect_uri parameter.
  4. Check the webhook and save the captured subpath contents.
  5. Log in as the attacker account and inspect the profile endpoints in the proxy sitemap.
  6. Replace the id, uuid and token in the attacker's request with the victim's values to view the victim's 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.

When you click 'log in with Google', the site sends you to a login page and then back to a return address called redirect_uri. If the site does not check that address strictly, an attacker can set it to a page they control, and the login token lands there instead of the real site. With that token the attacker can act as the victim.

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.

More by 0xRedFox29

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

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.