🇰🇷 한글 설명
Shopper는 헤드리스 이커머스 관리자 패널입니다. 2.0.0 이상 2.10.1 미만 및 3.0.0 프리릴리스(beta.1, beta.2) 버전에서, 콘텐츠 업로드 권한을 가진 인증된 백오피스 직원이 관리자 자신의 출처(origin)에 실행 가능한 미디어를 저장할 수 있습니다. 관리자가 해당 HTML 또는 SVG 파일을 열면 저장된 스크립트가 관리자 세션에서 실행되어 새로운 공격자 계정 생성 등 권한 상승이 가능합니다.
💡 쉬운 설명
직원이 업로드한 악성 파일을 관리자가 열면, 그 안의 숨은 코드가 관리자 권한으로 실행됩니다. 이를 통해 공격자는 자신만의 관리자 계정을 만들고 고객 정보와 주문 데이터에 접근할 수 있습니다.
🇺🇸 원문 (English)
Shopper is a Headless e-commerce Admin Panel. In versions from 2.0.0 prior to 2.10.1 and in the 3.0.0 prereleases beta.1 and beta.2, authenticated back-office staff with a content-upload permission can store executable media on the administrator's own origin. In the 2.x implementation, relevant upload permissions include `edit_products` or `add_brands`, and `packages/admin/config/media.php` allows `image/svg+xml` in every media collection, including image fields whose image/* validation also accepts SVG. The product files collection in `packages/admin/src/Livewire/Components/Products/Form/Files.php` has no MIME restriction and accepts `text/html` as well. Media is served inline from the `public` disk under `/storage/` with its own content type, without `Content-Disposition: attachment` or a `Content-Security-Policy`. When an administrator opens an uploaded HTML or SVG file, stored script executes in that administrator's session. In 2.x, the script can invoke `packages/admin/src/Livewire/SlideOvers/CreateTeamMember.php`, whose `store()` checks `access_setting` held by the viewing administrator but trusts client-supplied `role_id`, to create a new attacker-controlled administrator with a chosen password. This account persists after the uploaded file is deleted and gives access to customer data, orders, settings, and user/role management; the same script can exfiltrate data or grant permissions to the attacker's account. Direct account creation by the low-privileged uploader is blocked, so exploitation requires the administrator to open the file. The 3.x prerelease line already excludes SVG but still allows executable product files. This issue is fixed in versions 2.10.1 and 3.0.0-beta.3.
📍 영향받는 시스템
Shopper 2.0.0 이상 2.10.1 미만, 3.0.0-beta.1 및 beta.2
⚔️ 공격 벡터
업로드 권한을 가진 직원이 악성 HTML/SVG 파일을 올리고, 관리자가 이를 열면 세션 내에서 스크립트가 실행되어 관리자 계정을 생성
🛡️ 대응 방법
Shopper 2.10.1 또는 3.0.0-beta.3 이상으로 업그레이드하고, 실행 가능한 미디어 업로드 설정을 제한하며, 의심스러운 관리자 계정을 점검
🔧 검증 코드
출력된 버전이 2.10.1 이상 또는 3.0.0-beta.3 이상이면 패치된 것이고, 그보다 낮으면 취약한 상태입니다.
composer show shopper/framework 2>/dev/null | grep -E 'versions|name'