🇰🇷 한글 설명
CoreShop의 Pimcore 확장 이커머스 솔루션에서 GitHub Actions 워크플로우 설정 오류로 인해 발생하는 취약점입니다. 공격자가 악성 코드가 포함된 Pull Request를 제출하면, 검증되지 않은 코드가 실행되어 GitHub Actions 러너에서 원격 코드 실행(RCE)이 가능해집니다.
💡 쉬운 설명
해커가 가짜 수정 요청을 보내면, 시스템이 이를 검증 없이 자동으로 실행하여 해커의 명령어를 수행하게 되는 보안 구멍입니다. 이를 통해 해커는 개발 환경의 권한을 탈취할 수 있습니다.
🇺🇸 원문 (English)
CoreShop is a Pimcore enhanced eCommerce solution. In versions 5.0.1 through 5.1.0-beta.1,, the GitHub Actions workflow (`.github/workflows/static.yml`) uses the `pull_request_target` trigger but dangerously checks out the unverified code from the pull request head (`ref: ${{ github.event.pull_request.head.ref }}`). Subsequently, it executes a script (`bin/console`) from this untrusted checkout. This allows any external attacker to achieve Remote Code Execution (RCE) on the GitHub Actions runner simply by submitting a malicious Pull Request. Also known as a "Pwn Request" vulnerability. As of time of publication, `pull_request_target` is still in the file.
📍 영향받는 시스템
CoreShop versions 5.0.1 through 5.1.0-beta.1
⚔️ 공격 벡터
악성 코드가 포함된 Pull Request를 제출하여 GitHub Actions의 pull_request_target 트리거를 유도함
🛡️ 대응 방법
GitHub Actions 워크플로우에서 pull_request_target 대신 pull_request 트리거를 사용하거나, 체크아웃 시 검증된 브랜치(base ref)를 사용하도록 수정하십시오.
🔧 검증 코드
명령어 결과에 pull_request_target과 head.ref가 동시에 나타나면 취약한 설정이 존재함을 의미합니다.
grep -r "pull_request_target" .github/workflows/static.yml && grep -r "github.event.pull_request.head.ref" .github/workflows/static.yml