Skip to content
OAuth / SSO Disclosed report Intermediate

Bypassing Digits web authentication's host validation with HPP

Digits web authentication validated only the first host parameter but used the last one when transferring OAuth credentials. An attacker could supply multiple host parameters to redirect credentials to their own domain and log into victims' accounts on affected applications.

File Descriptor Follow

Originally disclosed on HackerOne

  • Triaged in 7 hours
  • Fixed in 28 hours
  • Paid in 7 days
  • Disclosed after 6 months

Hi, I would like to report an issue on Digits web authentication which allows attackers to retrieve the OAuth credential data of an application victims authorized.

#Detail As described in #108429, the login page has 2 parameters, consumer_key and host. The former identifies which app a user wants to authenticate, and the latter specifies which domain the OAuth credential data is sent to after authentication. In order to prevent other websites to pretend to be the application, the host parameter will be validated to see if it matches the registered domain of the app. Take Periscope as an example:

https://www.digits.com/login?consumer_key=9I4iINIyd0R01qEPEwT9IC6RE&host=https%3A%2F%2Fwww.periscope.tv

host=https://www.periscope.tv matches the registered domain

If we modify it:

https://www.digits.com/login?consumer_key=9I4iINIyd0R01qEPEwT9IC6RE&host=https%3A%2F%2Fattacker.com

host=https://attacker.com does not match the registered domain, thus the page will show an error.

However, the validation can be bypassed with HPP (HTTP Parameter Pollution). If we supply multiple host parameters, the validation will only compare the first one but the last one is used in the transfer step instead.

For example:

https://www.digits.com/login?consumer_key=9I4iINIyd0R01qEPEwT9IC6RE&host=https%3A%2F%2Fwww.periscope.tv&host=https%3A%2F%2Fattacker.com

The first host (host=https://www.periscope.tv) is validated but not the second one. After authentication the second host (host=https://attacker.com) is used as the transfer origin.

#Impact

It affects every application that has integrated Digits, and even official application (Periscope). Attacker can abuse the flaw to login to victim's account on the affected applications.

#PoC

  1. Prepare a Periscope account which is associated with a phone number
  2. Login to Periscope using the phone number with digits web login flow: http://innerht.ml/pocs/digits-host-validation-bypass-hpp/
  3. After that your account will be renamed as "Pwn3d"

#Fix Make sure the validated host is the same as the one used as the transfer host, or return error if HPP detected

The original report as published on HackerOne, by filedescriptor. 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

The application validated the first occurrence of the host parameter but used the last occurrence when transferring OAuth credentials, allowing HTTP parameter pollution to bypass host validation.

Impact

An attacker could abuse the flaw to log in to a victim's account on any application that has integrated Digits, including official applications like Periscope.

What the attacker needed

Attacker supplies a crafted login URL with multiple host…

The fix

The validated host should be the same as the one used as the transfer host, or an error should be returned if HPP is detected.

How it was found

  1. Prepare a Periscope account associated with a phone number.
  2. Log in to Periscope using the phone number with the Digits web login flow.
  3. After authentication, the account is renamed to 'Pwn3d'.

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 to an app using Digits, the login page checks that the website asking for your data is the real one. The check looked at only the first of several 'host' values in the link, but the system later used the last one. So an attacker could put a fake website last and steal your login data.

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 File Descriptor

View all

20 more disclosed reports, best first.

More from X / xAI

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.