Skip to content
OAuth / SSO Disclosed report Intermediate

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.

akhil-reni Follow

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:

7.png
7.png From the original on HackerOne

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
8.png
8.png From the original on HackerOne

Ex: https://fabric.io/img-srcx-onerrorprompt15/android/apps/app.myapplication/issues/56207e21f5d3a7f76bd5c20c

  • Change the call back URL to issue url

https://www.digits.com/login?consumer_key=YlNgs6zwm4QLmrzJBwRK3FcR5&callback_url=https://fabric.io/img-srcx-onerrorprompt15/android/apps/app.myapplication/issues/56207e21f5d3a7f76bd5c20c&host=https://fabric.io

  • 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.
9.png
9.png From the original on HackerOne

Regards, Akhil

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

  1. Visit the Digits login URL with a consumer key and a callback_url pointing to a page under the allowed host.
  2. Authorise the Digits app.
  3. You are redirected to the chosen callback page.
  4. Click a link on that page that points to an attacker-controlled site.
  5. 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.

More by akhil-reni

View all

13 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.