kcve.ai취약점 정보 · 내 자산 확인

CVE-2023-29007 Arbitrary configuration injection via `git submodule deinit`

`git submodule deinit`를 통한 임의의 설정 삽입

설명

Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit a bug in `config.c::git_config_copy_or_rename_section_in_file()`. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`.

Git은 리비전 제어 시스템이다. 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, 2.40.1 버전 이전에 특수하게 제작된 `.gitmodules` 파일과 1024자보다 긴 서브모듈 URL은 `config.c::git_config_copy_or_rename_section_in_file()'의 버그를 악용하는 데 사용할 수 있다. 이 버그는 하위 모듈과 관련된 구성 섹션을 제거하려고 할 때 사용자의 `$GIT_DIR/config`에 임의의 구성을 삽입하는 데 사용할 수 있습니다. 공격자가 실행할 실행 파일을 지정하는 구성 값(예: `core.pager`, `core.editor`, `core.sshCommand` 등)을 주입하면 원격 코드 실행이 발생할 수 있습니다. 수정 수정은 버전 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3 및 2.40.1에서 사용할 수 있습니다. 해결 방법으로, 신뢰할 수 없는 저장소에서 `git submodule deinit`을 실행하거나 `$GIT_DIR/config`의 하위 모듈 섹션을 사전 검사하지 마십시오.

영향 받는 제품 제품 1개

  • git

    git

    해결 버전 있음

    영향 받는 버전

    • 2.30.9 미만
    • 2.31.0 이상 2.31.8 미만
    • 2.32.0 이상 2.32.7 미만
    • 2.33.0 이상 2.33.8 미만
    • 2.34.0 이상 2.34.8 미만
    • 2.35.0 이상 2.35.8 미만
    • 2.36.0 이상 2.36.6 미만
    • 2.37.0 이상 2.37.7 미만
    외 3개 구간 펼치기
    • 2.38.0 이상 2.38.5 미만
    • 2.39.0 이상 2.39.3 미만
    • 2.40.0 이상 2.40.1 미만

    해결 버전

    • 2.30.9 이상
    • 2.31.8 이상
    • 2.32.7 이상
    • 2.33.8 이상
    • 2.34.8 이상
    • 2.35.8 이상
    • 2.36.6 이상
    • 2.37.7 이상
    외 3개 구간 펼치기
    • 2.38.5 이상
    • 2.39.3 이상
    • 2.40.1 이상

참고 자료 8건

‹ 목록

점검 지원 범위 문의

도입 문의