A Shopify app security check should cover the OAuth install flow, how access tokens are stored, HMAC verification on every webhook and app proxy request, session token (JWT) validation for embedded apps, isolation between shops, least-privilege API scopes and the mandatory privacy webhooks. If something has already gone wrong, the app also needs an incident report: timeline, root cause, affected shops and data, and the fixes made.
A Shopify app is a different target from an ordinary website. It holds access tokens for many merchant stores at once, trusts requests that claim to come from Shopify, and runs inside the Shopify admin. One missing signature check can let an attacker read or change data across every shop that installed the app. This checklist is the same list we work through in a Shopify app VAPT and incident report engagement, so your team can check the basics first.
1. OAuth install flow
- Verify the
hmacon the install and callback requests. Shopify signs the query string with your app's client secret. Recompute the HMAC-SHA256 over the remaining parameters, sorted, and compare it in constant time before trusting anything else in the request. - Validate the
shopparameter. Accept only a well-formed*.myshopify.comdomain. Never redirect to, or call, a shop domain you have not validated. - Use and check a
statenonce so an attacker cannot complete an install in someone else's session. - Prefer Shopify-managed installation and token exchange for embedded apps. It removes several of the redirect steps where these bugs usually live.
2. Access token storage
- Encrypt offline access tokens at rest, and keep the encryption key out of the database.
- Never send a token to the browser, write it to logs or put it in error-tracking payloads.
- Delete the shop's token when you receive the
app/uninstalledwebhook. - Know how to rotate your client secret and revoke tokens quickly. You will need this on the first day of any incident.
3. Webhooks and app proxies
- Check
X-Shopify-Hmac-Sha256on every webhook. It is a base64 HMAC-SHA256 of the raw request body with your client secret. Verify before you parse the JSON, and reject the request if it does not match. - Handle replays. Record the
X-Shopify-Webhook-Idheader and ignore duplicates, so a captured webhook cannot be processed twice. - Verify the app proxy
signaturebefore you uselogged_in_customer_idor any other proxy parameter. Without that check, anyone can call your proxy URL and pretend to be any customer. - Implement the mandatory privacy webhooks:
customers/data_request,customers/redactandshop/redact. Public apps need them, and they must actually find and delete the data.
4. Embedded app and session tokens
- Validate every App Bridge session token on the server: the signature with your client secret,
audequal to your API key,expandnbf, and adestthat matches the shop you are serving. - Set a
Content-Security-Policy: frame-ancestorsheader that allows only the merchant's shop domain andadmin.shopify.com, so the app cannot be framed by other sites. - Escape merchant- and customer-supplied data in the admin UI. A stored XSS inside an embedded app runs in the merchant's admin session.
5. Isolation between shops
This is the most common serious finding in multi-tenant apps. Take the shop from the verified session token or webhook, never from a request parameter, form field or header the browser can change. Then test it: log in as shop A, change an ID or shop domain in a request, and confirm you cannot read or change shop B's settings, orders or customers. Repeat for every endpoint, including exports, reports and background jobs.
6. API scopes and customer data
- Request only the access scopes the app uses, and remove scopes left over from old features.
- If you read customer names, emails, phone numbers or addresses, you fall under Shopify's protected customer data requirements. Store only the fields you need, encrypt them, and delete them on schedule.
- Keep the client secret and any third-party keys out of theme app extensions, front-end bundles and public repositories.
7. Billing and business logic
Confirm plan and charge status on the server through the Billing API instead of trusting values in the return URL. Then try to use paid features on a free plan, extend a trial, or trigger the same discount or fulfilment action twice at the same moment. Scanners do not find these issues; manual testing does.
If the app has already been compromised: the first 24 hours
- Preserve evidence. Do not delete logs or redeploy over the affected servers until copies are taken.
- Cut off access. Rotate the client secret, revoke suspect access tokens and any leaked third-party keys, and block rogue callback URLs or IP addresses.
- Close the door. Turn on HMAC verification everywhere it is missing and fix the entry point you can already see.
- Work out the scope. Use logs to list which shops, which data and which time window were affected.
- Notify. Indian companies must report many cyber incidents to CERT-In within six hours of noticing them. Personal data breaches also carry duties under the DPDP Act, so check which provisions apply on the date of the incident. Also check your Shopify partner terms and your merchant contracts for notification duties.
What goes into a Shopify app incident report
| Section | What it answers |
|---|---|
| Summary | What happened, in plain language, for merchants and management |
| Timeline | First malicious activity, detection, containment and recovery, with timestamps |
| Root cause | The exact weakness used, such as an unsigned webhook route or a leaked token |
| Impact | Affected shops, data categories and the time window |
| Actions taken | Containment, clean-up, fixes and how each fix was verified |
| Indicators of compromise | IP addresses, tokens, payloads and patterns to watch for |
| Evidence and recommendations | Log extracts and screenshots, plus the hardening still to do |
A good report is factual and dated, and every claim points to evidence. Merchants, insurers and partners will read it, so the summary should make sense without the technical sections. If you need one written, see our incident report for Shopify apps service.
A real example
When a Shopify app team we worked with faced webhook replay and OAuth token abuse, the response followed the steps above: suspect tokens were revoked and rotated, HMAC verification was enforced on every inbound webhook, the routes were placed behind rate limits, and a full grey-box VAPT of the app's REST and GraphQL endpoints followed. You can read the Zoomy Shopify app case study for details.
When to get a Shopify app VAPT
- Before you submit to the Shopify App Store or apply for Built for Shopify status.
- When a merchant or enterprise customer sends a security questionnaire.
- After a major release, a new data scope, or a change to your install or billing flow.
- After any incident, to confirm the attacker has no other way in.
Once you have the report, our guide on how to read a VAPT report and prioritise fixes helps your team decide what to fix first. If enterprise merchants ask for paperwork, see answering security questionnaires from enterprise customers.
Get your Shopify app tested
Manual VAPT of your app's OAuth, webhooks, session tokens and APIs, or same-day help and a written incident report if something has gone wrong.