Skip to content
Business logic Write-up Intermediate

Environment Cross-Trust: Leveraging Staging APIs to “Buy” for $0.00

A production frontend exposed a Shopify Storefront access token for a development store, and the development GraphQL API had introspection enabled, leaking unreleased product details and internal notes. Because the production checkout accepted carts created through the development API, an attacker could add a subscription priced at $0.00 in development and complete the order in production without payment.

0xpedrop Follow

Published on medium.com

Many bug hunters are afraid to delve into the scope of famous companies, thinking it’s the most complex system they’ve ever seen. Based on my experience, I can say: “Everyone makes mistakes, even large companies.”

0xPedrop, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the production frontend was configured to call a development Shopify store and shipped its Storefront access token, while the production checkout trusted cart and price data created through that development API instead of revalidating against production.

Impact

An attacker could obtain months of premium service at no cost and view unreleased product details and internal developer notes; the text does not mention any defence that limited the exploit.

What the attacker needed

Access to the public production site; no account needed to read the token

The fix

Production frontends should not point to development instances, and the final price should be revalidated server-side against the production database before checkout completes.

How it was found

  1. Observe the main site's browser traffic making requests to a Shopify development subdomain.
  2. Find the exposed Storefront access token in the request headers.
  3. Use the token to run GraphQL introspection and catalog queries against the development API.
  4. Create a cart on the development endpoint with the cartCreate mutation.
  5. Add the subscription variant priced at $0.00 to the cart.
  6. Open the returned checkout URL and complete the order in production with only a billing address.

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 write-up has not been written yet. The Original tab links to the source.

A website's front-end code was talking to a test version of the shop and included a key that let anyone use that test shop's programming interface. The test shop had a subscription set to cost nothing, and the real checkout trusted carts made there, so a person could 'buy' the subscription for free.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0xpedrop

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.