leaking Digits OAuth authorization to third party websites
The Digits OAuth callback_url parameter accepted any path or subdomain under the allowed host, so the authorization token was placed in the referrer when the user clicked a link on the callback page. An attacker could leak the token to a third-party site by setting the callback to a page containing an attacker-controlled link.
Originally disclosed on HackerOne
- Triaged in 24 hours
- Fixed in 4 months
- Paid in 8 days
- Disclosed after 5 months
Summary by the researcher
A better attack vector was also identified by chaining OAuth callbacks Example
https://www.digits.com/login?consumer_key=F1vVaDqvmTQbtoxYhzR6baV55&host=http%3A%2F%2Fwww.digits.com&callback_url=https%3A%2F%2Fwww.digits.com%2Flogin%3Fconsumer_key%3DmQQYhgvULqx2UPW8Za8iESZOy%26host%3Dhttps%3A%2F%2Fwesecureapp.com%2F%26callback_url%3Dhttps%3A%2F%2Fwesecureapp.com%2F
Upon navigating to the above URL, you will be presented with digits App, once you click Authorize you're redirected to attackers application and if you authorize that application too you will be redirected to attackers website with digits token as a referrer.
The report
Hi,
While authenticating digits to my Fabric account i have noticed that the callback_url is not solid i.e. any sub domain or any path is accepted as callback_url with host as fabric.io. This issue can be exploited by leaking the authorization token to third party websites (websites mentioned on kit's page)
Steps to reproduce:
- Go to https://www.digits.com/login?consumer_key=YlNgs6zwm4QLmrzJBwRK3FcR5&callback_url=https://fabric.io/kits/ios/stripe&host=https://fabric.io
- Give access to Digits
- Now you will be redirected to https://fabric.io/kits/ios/stripe
- While on stripe kits page click on the stripe website URL (https://stripe.com)
- The authorization token will be leaked to stripe.com

This issue can also be exploited on our organization member by actually leaking the consumer secret to our domain.
Steps to reproduce
- Add the victim to your organization
- Create an crash issue under fabric
- add a note to that issue for ex: https://wesecureapp.com
- Note down the issue URL

- Change the call back URL to issue url
- Give digits permission
- You will be redirected to issue
- Now click the link in the notes and the OAuth token will be leaked to the attacker controlled domain.

Regards, Akhil
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 OAuth callback URL validation only checked the host and allowed any path or subdomain, so tokens could be delivered to pages containing attacker-controlled links that leak the token via the Referer header.
Impact
An attacker could leak a victim's Digits OAuth authorization token to a third-party website, and in a second variant could leak the consumer secret to an attacker-controlled domain.
What the attacker needed
Victim clicks a crafted Digits login link; victim authorises the Digits app; victim clicks a link on the callback page
How it was found
- Visit the Digits login URL with a consumer key and a callback_url pointing to a page under the allowed host.
- Authorise the Digits app.
- You are redirected to the chosen callback page.
- Click a link on that page that points to an attacker-controlled site.
- The OAuth token is leaked to that site via the referrer.
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 a service like Digits, it sends you back to a website you chose earlier. That return address is called a callback URL. Here the service only checked the main domain, not the exact page, so an attacker could pick a page that contains a link to their own site. When you clicked that link, your login token was sent to the attacker's site in the referrer, which is information the browser sends about where you came from.
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.