🔍 CVE-2026-100689

5.9
CVSS Score
MEDIUM
2026-09-26
2026-09-30 18:18
✅ 완료

🇰🇷 한글 설명

GitPython 3.1.62 미만 버전에서 신뢰할 수 없는 .gitmodules 파일의 'path' 필드를 검증하지 않아 발생하는 취약점입니다. 공격자가 디렉토리 트래버설 경로를 포함한 설정을 사용하면 저장소 외부의 디렉토리를 생성하거나 삭제할 수 있습니다. 이 문제는 Submodule.update() 함수가 경로 검증 없이 절대 경로를 도출하기 때문에 발생합니다.

💡 쉬운 설명

악의적으로 조작된 설정 파일을 통해 프로그램이 허용된 폴더를 벗어나 컴퓨터의 다른 중요한 폴더를 만들거나 지울 수 있는 문제입니다. 특정 상황에서 파일을 업데이트할 때 경로 검증이 누락되어 발생합니다.

🇺🇸 원문 (English)

GitPython before 3.1.62 does not validate the `path` field read from an untrusted .gitmodules file when updating submodules. While a prior fix (GHSA-hmq2-w58f-27jc) added Submodule._validated_name() to constrain the `name` field, and GitPython's own containment guard Submodule._to_relative_path() is applied in add() and move(), Submodule.update() derives the absolute checkout location from the raw `path` value without that guard. A .gitmodules entry containing directory traversal components (e.g., path = ../../../tmp/escaped) can therefore cause directories to be created via os.makedirs() outside the repository working tree, populated from the submodule URL on the clone path, and removed via shutil.rmtree() when force_remove is used. Exploitation requires an application flow that updates submodules at a non-HEAD commit (such as a historical-commit API); the common clone-then-update flow re-derives the path from a canonical tree lookup and is not affected. The issue is fixed in GitPython 3.1.62.

📍 영향받는 시스템

GitPython 3.1.62 미만 버전

⚔️ 공격 벡터

조작된 .gitmodules 파일의 path 필드에 디렉토리 트래버설(../../) 경로를 삽입하여 공격

🛡️ 대응 방법

GitPython 버전을 3.1.62 이상으로 업데이트

🔧 검증 코드

출력된 버전이 3.1.62보다 낮으면 취약한 상태입니다.

Shell / Script
pip show GitPython | grep Version

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L

💻 영향받는 소프트웨어

Git