CVE-2026-63414: Shopify App: Token exchange shop context confusion may allow cross-shop authorization bypass in affected apps
The shopify_app Ruby gem, in versions 22.1.0 up to 23.0.3, could return the wrong shop from current_shopify_domain in token-exchange controllers. An attacker with a valid session token for one shop could add a different shop query parameter and make app code act on that shop. Fixed in 23.0.3.
Published Oct 29, 2026 · Analysis Oct 31, 2026
What an attacker can do
In token-exchange authenticated controllers, current_shopify_domain could resolve to the sanitized shop query parameter instead of the shop proven by the verified Shopify ID token or session. A request authenticated for shop A that also carried shop=B made the application treat B as the current shop.
The gem alone does not hand over data. Exposure depends on how the app uses the value. Apps are affected if they use token-exchange authentication, accept requests where a shop parameter can be present, and use current_shopify_domain or params[:shop] for authorization, tenant lookup, picking a stored access token, or scoping shop data. In those apps, the attacker can read another merchant's app data or run shop-scoped actions there.
The attacker needs a valid session token for any shop that has the app installed, which is a low privilege. The CVSS vector rates confidentiality and integrity impact as high and attack requirements as present, which fits the dependence on app code.
Who is affected
shopify_app from 22.1.0 up to but not including 23.0.3, when you use token-exchange authentication. Apps that never read current_shopify_domain or params[:shop] for security decisions are less exposed, but check your code.
Check the installed version and look for risky uses:
bundle list | grep shopify_app
grep -rn "current_shopify_domain\|params\[:shop\]" app/ lib/shopify_app
- Ecosystem
- RubyGems
- Affected
- >= 22.1.0, < 23.0.3
- Fixed in
- 23.0.3
- Check
bundle info shopify_app
How to fix it
Upgrade to shopify_app 23.0.3.
bundle update shopify_appThe patched version changes token-exchange handling in four ways. current_shopify_domain now returns the authenticated shop from the verified token or session. A new authenticated_shopify_domain exposes the trusted shop. A new requested_shopify_domain exposes the sanitized shop parameter for bootstrap or routing only. Token-exchange requests whose requested shop does not match the authenticated shop get 401 Unauthorized.
If you cannot upgrade yet, stop using params[:shop] for authorization, tenant lookup, token selection or data scoping. Use current_shopify_session.shop or the verified JWT dest value instead. Reject the request with 401 if a shop parameter is present and does not match.
How to tell if you were hit
Search application and web server logs for token-exchange requests where the shop query parameter differs from the shop in the session token's dest claim. Before the fix such requests succeeded. After the fix they return 401, so a rise in 401s on authenticated endpoints after upgrading can also point to earlier probing. Review per-shop access logs for data reads or writes that do not match the authenticated shop, and check whether any stored access token was loaded for a shop other than the caller's.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
In token-exchange authenticated controllers, shopify_app exposes shop context through helpers such as current_shopify_domain. Prior to the fix, current_shopify_domain could resolve to the sanitized shop query parameter instead of the shop identity derived from the verified Shopify ID token or active Shopify session.
As a result, a request authenticated for one shop could include a different shop query parameter, causing application code to treat the requested shop as the current shop.
Applications that used current_shopify_domain, or the request shop parameter, for authorization decisions, tenant lookup, stored access-token selection, or shop-scoped data access may have been vulnerable to cross-shop context confusion.
The patched version hardens token-exchange handling so that:
current_shopify_domainresolves to the authenticated shop from the verified token or session.authenticated_shopify_domainexposes the trusted authenticated shop.requested_shopify_domainexposes the sanitized requestedshopparameter for bootstrap or routing use cases only.- Token-exchange requests are rejected with
401 Unauthorizedwhen the requested shop does not match the authenticated shop.
Impact
In affected applications, an attacker with a valid Shopify session token for one shop could send an authenticated request that also supplied a different shop query parameter. If the application relied on current_shopify_domain or params[:shop] for security-sensitive shop scoping, application code could operate in the context of the requested shop rather than the authenticated shop.
Affected applications are those that:
- Use
shopify_apptoken-exchange authentication; - Accept authenticated controller requests where a
shopquery parameter may be present; and - Use
current_shopify_domainor the requestshopparameter for authorization, tenant lookup, stored access-token selection, or shop-scoped resource access.
Depending on the application’s authorization model, this could result in unauthorized access to another shop’s application data or unauthorized shop-scoped actions.
Remediation
Upgrade to shopify_app version 23.0.3
Workarounds
Applications that cannot upgrade immediately should apply equivalent validation in token-exchange authenticated controllers:
- Do not use
params[:shop]for authorization, tenant lookup, access-token selection, or data scoping. - On vulnerable versions, avoid relying on
current_shopify_domainfor security-sensitive shop scoping if ashopquery parameter may be present. - Use the authenticated shop from the verified ID token or active Shopify session instead, such as
current_shopify_session.shopor the verified JWTdestvalue. - If a sanitized
params[:shop]value is present, reject the request with401 Unauthorizedwhen it does not match the authenticated shop.
Credit
This issue was responsibly reported by Hackerone researcher leqtuer.
Questions
- Is every app using shopify_app affected by CVE-2026-63414?
No. It affects apps on versions 22.1.0 to before 23.0.3 that use token-exchange authentication and rely on current_shopify_domain or the shop parameter for authorization, tenant lookup, access-token selection or data scoping.
- What does the attacker need?
A valid Shopify session token for one shop, plus the ability to add a different shop query parameter to an authenticated request. No user interaction is needed.
- Which helper should I use after upgrading?
Use authenticated_shopify_domain, or current_shopify_domain, which now returns the authenticated shop. Use requested_shopify_domain only for bootstrap or routing, never for authorization.
- Is it exploited in the wild?
No source says so, and it is not in CISA's KEV catalog.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
