Skip to content
CSRF Disclosed report Beginner

[h1-2102] Wholesale - CSRF to Generate Invitation Token for a Customer and Move Customer to Invited Status

The Wholesale application lacked CSRF protection on the action that generates an invitation token for a customer and moves that customer to the invited status. An attacker could make a logged-in merchant visit a page that silently triggers this action, generating an invite link and changing the customer's status.

Justin Gardner Follow

Originally disclosed on HackerOne

  • Triaged in 26 hours
  • Fixed in 50 days
  • Paid in 5 days
  • Disclosed after 10 months

Summary:

There is a CSRF vulnerability in the Wholesale application to generate an invitation token for a user and move that user to invited status.

Steps To Reproduce:

  1. Log in to Shopify and configure Wholesale
  2. Add a price list
  3. Add a customer with the tag wholesale
  4. Adjust the pricelist to include the user with the wholesale tag
  5. At this point you should see the user in the customer section (see figure 1)
  6. Now, navigate to https://poc.rhynorater.com/wholesaleShopify/CSRF.html
  7. Wait 30 seconds (for good measure)
  8. Refresh the customer page and note that the user is in the status of invited

Figure 1

Screenshot_from_2021-01-31_22-06-15.png
Screenshot_from_2021-01-31_22-06-15.png From the original on HackerOne

Supporting Material/References:

Impact

Move customer to invited status and generated invite link.

The original report as published on HackerOne, by rhynorater. 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 invitation endpoint accepted state-changing requests without a CSRF token or origin check, so a cross-site request was treated as legitimate.

Impact

A logged-in merchant could be tricked into moving a customer to the invited status and generating an invite link without intending to.

What the attacker needed

Merchant logged in to Wholesale; victim visits attacker page; customer tagged wholesale

How it was found

  1. Log in to Shopify and configure Wholesale
  2. Add a price list and a customer tagged wholesale, then include that customer in the price list
  3. Confirm the customer appears in the customer section
  4. Visit the attacker's proof-of-concept page while logged in
  5. Wait, then refresh the customer page and see the customer is now in the invited status

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.

CSRF (cross-site request forgery) is when a malicious website makes your browser send a request to another site where you are already logged in, without you meaning to. Here, a merchant who was logged in to the Wholesale app could be tricked into visiting an attacker's page, which quietly asked the app to invite a customer and create an invite link.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Justin Gardner

View all

6 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 request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.