GitPython: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
概要
GitPython: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
原文の説明
取得元が公開している説明をそのまま載せています (多くは英語)。
[HIGH] Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
- CWE: CWE-200 (Exposure of Sensitive Information) / CWE-73 (External Control of File Name or Path)
- Affected component:
git/objects/submodule/base.py,Submodule._config_parser()(~line 273) constructingSubmoduleConfigParser(fp_module, read_only=read_only);git/config.py,GitConfigParser.__init__(merge_includesdefault),GitConfigParser.read()/_included_paths()(include-path resolution, ~lines 630-685),GitConfigParser._read()(~line 493-498,MissingSectionHeaderError) - Affected version: GitPython at HEAD (
9729ed3b948f2bde09f1f188c5311e172212b67e, 2026-08-05, VERSION3.1.58)
Reachability
GitConfigParser.__init__ defaults merge_includes=True: any config file it parses has its [include] (and, when a repo= is supplied, [includeIf ...]) directives followed and merged in. The maintainers already recognized this as dangerous for one specific case and fixed it in commit 41ecc6a4 ("Disable merge_includes in config writers"), which passes merge_includes=False when Repo.config_writer() builds its parser (git/repo/base.py).
That fix never touched Submodule._config_parser(). This method builds the parser used for every read of a repo's submodule configuration — repo.submodules, Submodule.iter_items(), Submodule.config() — via `SubmoduleConfigParser(fp_modu…
出典: NIST National Vulnerability Database NVD GitHub Advisory
AI要約
外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
GitPythonのバージョン3.1.59以前には、.gitmodulesファイルの解析時にmerge_includesが無効化されないという脆弱性があります。攻撃者は任意のファイルパスを含む.gitmodulesを使用して、ローカルファイルの内容を開示する可能性があります。この問題により、攻撃者はリポジトリ内の敏感な情報にアクセスすることが可能です。
.gitmodulesの解析時にmerge_includesが無効化されない脆弱性
GitPythonバージョン3.1.59以前
攻撃者が任意のファイルパスを含めることで、ローカルファイルの内容が開示される可能性があります。重要な情報が漏洩するリスクがあります。
GitPythonをバージョン3.1.59に更新してください。
該当の.gitmodulesファイルを手動で確認し、信頼できないincludeディレクティブを削除する。
リポジトリ内の.gitmodulesファイルに信頼できないincludeディレクティブが含まれていないか確認する。
影響パッケージ
参照URL
- advisory disclosure@vulncheck.com
- exploit github.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com