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