|
| 1 | +--- |
| 2 | +gem: shopify_app |
| 3 | +ghsa: 6j52-38f8-qhxr |
| 4 | +url: https://github.com/Shopify/shopify_app/security/advisories/GHSA-6j52-38f8-qhxr |
| 5 | +title: Token exchange shop context confusion may allow cross-shop |
| 6 | + authorization bypass in affected apps |
| 7 | +date: 2026-06-24 |
| 8 | +description: | |
| 9 | + ## Description |
| 10 | +
|
| 11 | + In token-exchange authenticated controllers, shopify_app exposes shop |
| 12 | + context through helpers such as current_shopify_domain. Prior to the |
| 13 | + fix, current_shopify_domain could resolve to the sanitized shop query |
| 14 | + parameter instead of the shop identity derived from the verified |
| 15 | + Shopify ID token or active Shopify session. |
| 16 | +
|
| 17 | + As a result, a request authenticated for one shop could include a |
| 18 | + different shop query parameter, causing application code to treat |
| 19 | + the requested shop as the current shop. |
| 20 | +
|
| 21 | + Applications that used current_shopify_domain, or the request shop |
| 22 | + parameter, for authorization decisions, tenant lookup, stored |
| 23 | + access-token selection, or shop-scoped data access may have been |
| 24 | + vulnerable to cross-shop context confusion. |
| 25 | +
|
| 26 | + The patched version hardens token-exchange handling so that: |
| 27 | +
|
| 28 | + * `current_shopify_domain` resolves to the authenticated shop from |
| 29 | + the verified token or session. |
| 30 | + * `authenticated_shopify_domain` exposes the trusted authenticated shop. |
| 31 | + * `requested_shopify_domain` exposes the sanitized requested shop |
| 32 | + parameter for bootstrap or routing use cases only. |
| 33 | + * Token-exchange requests are rejected with `401 Unauthorized` when |
| 34 | + the requested shop does not match the authenticated shop. |
| 35 | +unaffected_versions: |
| 36 | + - "< 22.1.0" |
| 37 | +patched_versions: |
| 38 | + - ">= 23.0.3" |
| 39 | +related: |
| 40 | + url: |
| 41 | + - https://rubygems.org/gems/shopify_app/versions/23.0.3 |
| 42 | + - https://github.com/Shopify/shopify_app/blob/v23.0.3/CHANGELOG.md#2303-june-24-2026 |
| 43 | + - https://github.com/Shopify/shopify_app/releases/tag/v23.0.3 |
| 44 | + - https://github.com/Shopify/shopify_app/pull/2081 |
| 45 | + - https://github.com/Shopify/shopify_app/security/advisories/GHSA-6j52-38f8-qhxr |
| 46 | +notes: | |
| 47 | + - GHSA has "High" severity. |
| 48 | + - date from CHANGELOG.md |
| 49 | + - no CVE |
0 commit comments