🇰🇷 한글 설명
Shopify App은 Shopify 애플리케이션 구축을 위한 Rails 엔진입니다. 22.1.0부터 23.0.3 이전 버전의 token-exchange 인증 컨트롤러는 검증된 Shopify ID 토큰이나 활성 세션의 신원 대신 요청에서 파생된 shop 컨텍스트를 노출할 수 있으며, 이로 인해 한 shop에 대해 인증된 요청이 다른 shop을 현재 테넌트로 취급하게 만들 수 있습니다. 이 문제는 23.0.3 버전에서 수정되었습니다.
💡 쉬운 설명
정상적으로 로그인한 사용자가 쿼리 파라미터의 shop 값을 바꿔 다른 상점의 데이터에 접근할 수 있는 취약점입니다. 애플리케이션이 이 값을 권한 판단에 사용하는 경우 위험합니다.
🇺🇸 원문 (English)
Shopify App is a Rails engine for building Shopify applications. From 22.1.0 until 23.0.3, `token-exchange` authenticated controllers can expose a request-derived `shop` context instead of the identity from a verified Shopify ID token or active Shopify session. `current_shopify_domain` can resolve to the sanitized `shop` query parameter, so a request authenticated for one `shop` can cause application code to treat a different requested `shop` as current. Affected applications use `shopify_app` `token-exchange` authentication, accept authenticated requests with a `shop` query parameter, and rely on `current_shopify_domain` or `params[:shop]` for authorization, tenant lookup, stored access-token selection or `shop`-scoped data access. An attacker with a valid Shopify session token for one `shop` can supply another `shop` in that parameter and potentially obtain unauthorized application data or perform `shop`-scoped actions, depending on the application's authorization model. This issue is fixed in version 23.0.3.
📍 영향받는 시스템
shopify_app gem 22.1.0 이상 23.0.3 미만 버전을 token-exchange 인증과 함께 사용하는 Shopify 앱
⚔️ 공격 벡터
유효한 Shopify 세션 토큰으로 인증한 뒤 요청의 shop 쿼리 파라미터를 다른 상점 도메인으로 바꿔 해당 상점의 데이터나 작업에 접근
🛡️ 대응 방법
shopify_app gem을 23.0.3 이상으로 업그레이드하고, 권한 확인에 params[:shop] 대신 검증된 세션의 shop 값을 사용하도록 코드를 점검
🔧 검증 코드
출력된 버전이 23.0.3 이상이면 수정된 버전이며, 22.1.0 이상 23.0.3 미만이면 취약하므로 업그레이드가 필요합니다.
bundle exec gem list shopify_app 2>/dev/null | grep -E 'shopify_app \(' || grep -E 'shopify_app' Gemfile.lock
💻 영향받는 소프트웨어
IBM Verify Identity Access