🇰🇷 한글 설명
dedupe 라이브러리의 GitHub Actions 워크플로우(benchmark-bot.yml)에서 @benchmark 댓글 트리거 시 악의적으로 조작된 PR 브랜치의 신뢰할 수 없는 코드가 실행되는 취약점. 탈취된 GITHUB_TOKEN으로 contents 스코프를 포함한 대부분의 권한을 가지고 저장소를 장악할 수 있음.
💡 쉬운 설명
GitHub 댓글로 악의적인 코드를 실행시켜 저장소 접근 토큰을 탈취할 수 있습니다. 탈취된 토큰으로 공격자가 전체 저장소를 제어할 수 있습니다.
🇺🇸 원문 (English)
dedupe is a python library that uses machine learning to perform fuzzy matching, deduplication and entity resolution quickly on structured data. Before commit 3f61e79, a critical severity vulnerability has been identified within the .github/workflows/benchmark-bot.yml workflow, where a issue_comment can be triggered using the @benchmark body. This workflow is susceptible to exploitation as it checkout the ${{ github.event.issue.number }}, which correspond to the branch of the PR manipulated by potentially malicious actors, and where untrusted code may be executed. Running untrusted code may lead to the exfiltration of GITHUB_TOKEN, which in this workflow has write permissions on most of the scopes - in particular the contents one - and could lead to potential repository takeover. This is fixed by commit 3f61e79.
📍 영향받는 시스템
dedupe 라이브러리 (commit 3f61e79 이전 버전)
⚔️ 공격 벡터
PR에 @benchmark 댓글을 달아 악의적 코드가 포함된 브랜치의 워크플로우 자동 실행 유도
🛡️ 대응 방법
dedupe를 commit 3f61e79 이후 버전으로 업데이트하거나 workflow에서 신뢰할 수 있는 브랜치만 체크아웃하도록 수정
🔧 검증 코드
설치된 dedupe 버전을 확인하여 commit 3f61e79 이후 패치 버전 적용 여부 검증
pip show dedupe | grep Version