🇰🇷 한글 설명
Conda Organization Infrastructure의 conda/conda 저장소에서 9c0f238 커밋 이전까지 GitHub Actions Pwn Request 취약점이 존재했습니다. 악의적인 PR 또는 댓글 명령을 통해 특권 토큰 컨텍스트에서 샌드박스 없는 Jinja2 템플릿 렌더링이 실행될 수 있었습니다.
💡 쉬운 설명
공격자가 조작된 풀 리퀘스트와 댓글 명령으로 자동화 시스템의 권한을 빼앗을 수 있었던 취약점입니다. 이 문제는 해당 커밋으로 수정되었습니다.
🇺🇸 원문 (English)
Conda Organization Infrastructure is a centralized location for infrastructure codes. Prior to commit 9c0f238, a GitHub Actions Pwn Request vulnerability appears to remain present in conda/conda. The affected workflow is .github/workflows/update.yml. It is triggered by issue_comment events containing @conda-bot render or @conda-bot recreate. For the render path, the workflow obtains the pull request head repository and branch from the PR API, checks out that PR-controlled repository/ref using secrets.SYNC_TOKEN, and then runs conda/actions/template-files@7f6830b1428a9bd47f0b068892c77eae95207037. The external template-files action reads its default configuration and templates from the checked-out working directory. In the confirmed finding, that action uses an unsandboxed Jinja2 environment to render attacker-controlled template content. This creates a Pwn Request chain in which an untrusted PR/comment path can reach template rendering in a privileged token context. This issue has been patched via commit 9c0f238.
📍 영향받는 시스템
conda/conda 저장소의 9c0f238 커밋 이전 버전 (.github/workflows/update.yml 사용 환경)
⚔️ 공격 벡터
공격자가 PR 헤드 저장소에 악성 템플릿을 넣고 '@conda-bot render' 댓글을 달아 권한 있는 토큰 컨텍스트에서 샌드박스 없는 Jinja2 템플릿을 렌더링하게 함
🛡️ 대응 방법
9c0f238 커밋 이상의 최신 코드로 업데이트하고, 워크플로우에서 신뢰할 수 없는 PR 코드 체크아웃과 시크릿 사용을 분리하며, Jinja2 렌더링에 샌드박스 환경을 적용
🔧 검증 코드
출력값이 1 이상이면 수정 커밋이 포함된 것이며, 0이면 해당 패치가 적용되지 않은 상태이므로 즉시 업데이트가 필요합니다.
git -C /path/to/conda log --oneline | grep -c 9c0f238