🇰🇷 한글 설명
Conflibot 1.2.1 미만 버전에서 pull_request_target 설정 사용 시, 공격자가 제어 가능한 pull request의 branch name에 쉘 메타문자를 삽입하여 임의의 명령어를 실행할 수 있는 취약점이 존재합니다. 이 취약점을 통해 공격자는 runner의 비밀 정보(secrets)를 탈취하거나 GITHUB_TOKEN을 남용하여 권한 없는 푸시를 수행할 수 있습니다.
💡 쉬운 설명
악성 코드가 포함된 이름의 브랜치를 통해 자동화 도구가 공격자의 명령을 대신 실행하게 만드는 보안 허점입니다. 이를 통해 해커가 프로젝트의 중요한 비밀번호를 훔치거나 코드를 마음대로 수정할 수 있습니다.
🇺🇸 원문 (English)
Conflibot warns in advance when merging a pull request will cause conflicts in other open pull requests. Prior to 1.2.1, src/index.ts builds git checkout, git merge, and git format-patch commands by interpolating the attacker-controlled pull request head.ref value into strings passed to exec. In the documented pull_request_target configuration, an attacker can open a pull request, including from a fork, whose branch name contains shell metacharacters, and the workflow automatically interprets those characters as commands without maintainer interaction. The commands execute on a runner with base-repository secrets and a write-scoped GITHUB_TOKEN, allowing arbitrary command execution, secret or token exfiltration, unauthorized pushes, and other token abuse. The fixed implementations in src/index.ts and src/conflibot.ts use execFile or spawn argument arrays, and the v2 line also uses numeric pull-request refs rather than branch names. This issue is fixed in versions 1.2.1 and 2.0.0.
📍 영향받는 시스템
Conflibot versions prior to 1.2.1 and 2.0.0
⚔️ 공격 벡터
공격자가 쉘 메타문자가 포함된 브랜치 이름을 가진 Pull Request를 생성하여 자동화 워크플로우를 트리거함
🛡️ 대응 방법
Conflibot을 버전 1.2.1 또는 2.0.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 1.2.1 또는 2.0.0보다 낮은지 확인하여 취약 여부를 판단합니다.
npm list conflibot | grep -E 'conflibot@([0-9]+\.[0-9]+\.[0-9]+)'