🇰🇷 한글 설명
Mercurial 4.4.1 이전 버전에서 특수 조작된 저장소를 통해 Git 서브저장소의 .git/hooks/post-update 스크립트가 실행되는 취약점입니다. 일반적인 Mercurial 사용으로는 이러한 저장소 구성이 불가능하지만 프로그래밍 방식으로 생성 가능합니다.
💡 쉬운 설명
Mercurial에서 특별히 만든 저장소가 Git 저장소에 숨겨진 스크립트를 자동으로 실행하게 만들 수 있는 취약점입니다. 이를 통해 공격자가 컴퓨터에서 임의의 프로그램을 실행할 수 있습니다.
🇺🇸 원문 (English)
In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository. Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.
📍 영향받는 시스템
Mercurial 4.4.1 이전 모든 버전 (특히 Git 서브저장소를 사용하는 경우)
⚔️ 공격 벡터
특수 조작된 저장소를 clone하거나 pull할 때 .git/hooks/post-update 스크립트가 자동 실행
🛡️ 대응 방법
Mercurial을 4.4.1 이상으로 업그레이드
🔧 검증 코드
출력된 버전 번호가 4.4.1 이상이면 패치됨, 이하이면 취약한 상태
hg --version 2>/dev/null | head -1