🇰🇷 한글 설명
Git이 설정 값을 읽을 때 끝에 붙은 줄바꿈 문자(CRLF)를 제거하는 과정에서 발생하는 취약점입니다. 서브모듈 경로에 줄바꿈 문자가 포함될 경우 의도하지 않은 경로에 체크아웃될 수 있으며, 심볼릭 링크와 실행 가능한 post-checkout 훅이 결합될 경우 임의의 스크립트가 실행될 위험이 있습니다.
💡 쉬운 설명
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 reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. 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 미만 버전
⚔️ 공격 벡터
줄바꿈 문자가 포함된 서브모듈 경로와 심볼릭 링크를 이용한 악성 post-checkout 훅 실행
🛡️ 대응 방법
Git을 최신 보안 패치가 적용된 버전(v2.43.7, v2.44.4 등 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 Git 버전이 보안 패치가 적용된 최소 버전(예: v2.43.7 이상)인지 확인합니다.