🇰🇷 한글 설명
Git의 번들 URI 기능에서 원격 서버의 광고된 번들에 대한 충분한 검증이 부족하여 프로토콜 주입 공격이 가능합니다. 공격자는 이를 통해 클라이언트가 번들을 공격자가 제어하는 위치에 작성하도록 할 수 있으며, 최악의 경우 임의 코드 실행이 가능합니다.
💡 쉬운 설명
Git에서 서버로부터 받은 번들 파일을 충분히 검증하지 않아서 악의적인 서버가 파일을 원치 않는 위치에 저장하게 할 수 있습니다. 이를 통해 공격자는 악성 코드를 실행하거나 시스템을 손상시킬 수 있습니다.
🇺🇸 원문 (English)
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When cloning a repository Git knows to optionally fetch a bundle advertised by the remote server, which allows the server-side to offload parts of the clone to a CDN. The Git client does not perform sufficient validation of the advertised bundles, which allows the remote side to perform protocol injection. This protocol injection can cause the client to write the fetched bundle to a location controlled by the adversary. The fetched content is fully controlled by the server, which can in the worst case lead to arbitrary code execution. The use of bundle URIs is not enabled by default and can be controlled by the bundle.heuristic config option. Some cases of the vulnerability require that the adversary is in control of where a repository will be cloned to. This either requires social engineering or a recursive clone with submodules. These cases can thus be avoided by disabling recursive clones. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.
📍 영향받는 시스템
Git v2.43.7 이하, v2.44.4 이하, v2.45.4 이하, v2.46.4 이하, v2.47.3 이하, v2.48.2 이하, v2.49.1 이하, v2.50.1 이하
⚔️ 공격 벡터
원격 Git 서버가 제어된 번들 URI를 광고하여 클라이언트의 프로토콜 주입 및 임의 파일 작성 유도
🛡️ 대응 방법
Git을 v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, v2.50.1 이상으로 업그레이드하거나 bundle.heuristic을 비활성화하고 재귀적 클론 비활성화
🔧 검증 코드
출력된 Git 버전이 각 메이저 버전별 권장 버전 이상이면 안전함. 그 이하면 취약함
git --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'