CVE-2026-78675
GitPython before 3.1.59 Local File Content Disclosure via .gitmodules
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.6
GitPython before 3.1.59 Local File Content Disclosure via .gitmodules
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
CVE-2026-78675- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-73
- Updated
- 2026-11-02
EUVDEUVD-2026-65221
8.6
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
EUVD-2026-65221- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-7833-fr7j-v32q
8.6
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_module, read_only=read_only), passing neither merge_includes=False nor repo=. The True class default is therefore inherited unchanged, and fp_module here is .gitmodules — the single most attacker-controlled config file in the entire codebase, since it ships verbatim as tracked content inside any cloned repository.
GitConfigParser.read()'s include-path resolution (~line 662-680) performs no containment check: osp.isabs(include_path) short-circuits the path join entirely for an absolute path, and a relative path is joined with osp.join(osp.dirname(file_path), include_path) / osp.normpath()'d with no check that the result stays under the repository. ~ is expanded via osp.expanduser. The only gate before opening is os.access(include_path, os.R_OK) — a readability check, not a path restriction.
Once opened, GitConfigParser._read() parses the target file as git-config INI. If the first non-blank/non-comment line is not a [section] header — true of virtually any non-gitconfig file (source code, /etc/passwd, .env files, credential files, logs, JSON/YAML) — it raises configparser.MissingSectionHeaderError(fpname, lineno, line). Python's stdlib formats this exception's str() as "File contains no section headers.\nfile: %r, line: %d\n%r" % (fpname, lineno, line) — it embeds the verbatim content of that file's first line in the exception message. Submodule.iter_items() catches only (IOError, BadName), not configparser.Error, so this exception propagates straight out of the ordinary, read-only repo.submodules call.
Root cause
Parity gap between two config-parser construction sites for the exact same footgun: Repo.config_writer() was hardened against merge_includes in 2023 (41ecc6a4); Submodule._config_parser() — which parses .gitmodules, content that is always attacker-controlled the moment a repository is cloned from an untrusted source — was never given the same treatment. (The submodule write-mode config parser at git/objects/submodule/base.py for .git/modules/<name>/config — a different, locally-generated file — has correctly passed merge_includes=False since 2022, underscoring that the omission for .gitmodules reads looks like an oversight rather than a considered exception.)
Exploit path
- Attacker crafts a repository whose
.gitmodulescontains a legitimate-looking[submodule ...]section plus:
(an…[include] path = /etc/passwd
- Record
GHSA-7833-fr7j-v32q- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-73, CWE-200
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-crmc-f4m7-33fj
8.6
Duplicate Advisory: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-7833-fr7j-v32q. This link is maintained to preserve external references.
Original Description
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
GHSA-crmc-f4m7-33fj- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-73
- Updated
- 2026-11-02
NVD
8.6
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
CVE-2026-78675- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-73
- Updated
- 2026-11-02
OSVALPINE-CVE-2026-78675
7.8
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
ALPINE-CVE-2026-78675- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
Show 13 moreShow less
OSV
8.6
GitPython before 3.1.59 Local File Content Disclosure via .gitmodules
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
CVE-2026-78675- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-73
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-78675
7.8
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
DEBIAN-CVE-2026-78675- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-7833-fr7j-v32q
8.6
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_module, read_only=read_only), passing neither merge_includes=False nor repo=. The True class default is therefore inherited unchanged, and fp_module here is .gitmodules — the single most attacker-controlled config file in the entire codebase, since it ships verbatim as tracked content inside any cloned repository.
GitConfigParser.read()'s include-path resolution (~line 662-680) performs no containment check: osp.isabs(include_path) short-circuits the path join entirely for an absolute path, and a relative path is joined with osp.join(osp.dirname(file_path), include_path) / osp.normpath()'d with no check that the result stays under the repository. ~ is expanded via osp.expanduser. The only gate before opening is os.access(include_path, os.R_OK) — a readability check, not a path restriction.
Once opened, GitConfigParser._read() parses the target file as git-config INI. If the first non-blank/non-comment line is not a [section] header — true of virtually any non-gitconfig file (source code, /etc/passwd, .env files, credential files, logs, JSON/YAML) — it raises configparser.MissingSectionHeaderError(fpname, lineno, line). Python's stdlib formats this exception's str() as "File contains no section headers.\nfile: %r, line: %d\n%r" % (fpname, lineno, line) — it embeds the verbatim content of that file's first line in the exception message. Submodule.iter_items() catches only (IOError, BadName), not configparser.Error, so this exception propagates straight out of the ordinary, read-only repo.submodules call.
Root cause
Parity gap between two config-parser construction sites for the exact same footgun: Repo.config_writer() was hardened against merge_includes in 2023 (41ecc6a4); Submodule._config_parser() — which parses .gitmodules, content that is always attacker-controlled the moment a repository is cloned from an untrusted source — was never given the same treatment. (The submodule write-mode config parser at git/objects/submodule/base.py for .git/modules/<name>/config — a different, locally-generated file — has correctly passed merge_includes=False since 2022, underscoring that the omission for .gitmodules reads looks like an oversight rather than a considered exception.)
Exploit path
- Attacker crafts a repository whose
.gitmodulescontains a legitimate-looking[submodule ...]section plus:
(an…[include] path = /etc/passwd
- Record
GHSA-7833-fr7j-v32q- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-200, CWE-73
- Updated
- 2026-11-02
OSVGHSA-crmc-f4m7-33fj
8.6
Duplicate Advisory: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-7833-fr7j-v32q. This link is maintained to preserve external references.
Original Description
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
GHSA-crmc-f4m7-33fj- CVSS 4.0
- 8.6 High
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.4 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-73
- Updated
- 2026-11-02
OSVOESA-2026-3699
9.3
python-GitPython security update
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
Security Fix(es):
GitPython before 3.1.57 contains an incomplete denylist in the unsafe_git_archive_options guard that omits --add-file and --add-virtual-file options. Attackers can supply these options to Repo.archive() to read arbitrary files from the filesystem and include them in the returned archive.(CVE-2026-73619)
GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.(CVE-2026-73620)
GitPython before 3.1.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output=<path>, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).(CVE-2026-73621)
GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.(CVE-2026-73622)
GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.(CVE-2026-73623)
GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.(CVE-2026-73624)
GitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.(CVE-2026-73625)
GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.(CVE-2026-76217)
GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.(CVE-2026-76218)
GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to…
- Record
OESA-2026-3699- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVOESA-2026-3700
9.3
python-GitPython security update
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
Security Fix(es):
GitPython before 3.1.57 contains an incomplete denylist in the unsafe_git_archive_options guard that omits --add-file and --add-virtual-file options. Attackers can supply these options to Repo.archive() to read arbitrary files from the filesystem and include them in the returned archive.(CVE-2026-73619)
GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.(CVE-2026-73620)
GitPython before 3.1.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output=<path>, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).(CVE-2026-73621)
GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.(CVE-2026-73622)
GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.(CVE-2026-73623)
GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.(CVE-2026-73624)
GitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.(CVE-2026-73625)
GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.(CVE-2026-76217)
GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.(CVE-2026-76218)
GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to…
- Record
OESA-2026-3700- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVOESA-2026-3721
9.3
python-GitPython security update
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
Security Fix(es):
GitPython before 3.1.57 contains an incomplete denylist in the unsafe_git_archive_options guard that omits --add-file and --add-virtual-file options. Attackers can supply these options to Repo.archive() to read arbitrary files from the filesystem and include them in the returned archive.(CVE-2026-73619)
GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.(CVE-2026-73620)
GitPython before 3.1.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output=<path>, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).(CVE-2026-73621)
GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.(CVE-2026-73622)
GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.(CVE-2026-73623)
GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.(CVE-2026-73624)
GitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.(CVE-2026-73625)
GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.(CVE-2026-76217)
GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.(CVE-2026-76218)
GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to…
- Record
OESA-2026-3721- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVPYSEC-2026-3785
7.8
GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.
- Record
PYSEC-2026-3785- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1789368141 No score
TuxCare security update for gitpython (5 CVEs)
TuxCare rebuilt gitpython to address 5 CVEs. Fixed in 3.1.31.post12+tuxcare.
- Record
CLSA-2026-1789368141- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:21874-1 No score
Security update for python-GitPython
This update for python-GitPython fixes the following issues:
- CVE-2026-67322: environment-variable exfiltration in
Repo.clone_from()URL via os.path.expandvars() (bsc#1273357). - CVE-2026-67323: unguarded Git options passed as keyword arguments in
Repo.archive()andgit.ls_remote()allow for command injection (bsc#1273358). - CVE-2026-67325: incomplete command injection blocklist fails to account for git's long-option prefix abbreviation feature and allows for bypass (bsc#1273359).
- CVE-2026-67326: failure to validate newline characters in the section parameter of
config_writer()can lead to RCE viacore.hooksPath(bsc#1273364). - CVE-2026-69097: failure to properly escape section names in Git
configfiles allows for injection of arbitrary configuration directives through malicious submodule names and can lead to RCE (bsc#1273414). - CVE-2026-73619: incomplete denylist in the
unsafe_git_archive_optionsguard that omits--add-fileand--add- virtual-fileoptions can lead to arbitrary file reads (bsc#1275755). - CVE-2026-73620: failure to guard Git option forwarding in
IndexFile.checkout()andTagReference.create()can lead to arbitrary file reads and writes (bsc#1275756). - CVE-2026-73621: argument injection in the
Commit.count()method allows for destruction/blanking of arbitrary files (bsc#1275757). - CVE-2026-73622: failure to disable environment variable expansion in
Remote.create()andSubmodule.add()URL handling allows for secret exfiltration via URLs containing variable references (bsc#1275751). - CVE-2026-73623: incomplete denylist in
unsafe_git_clone_optionsthat omits--templateallows for arbitrary command execution (bsc#1275752). - CVE-2026-73624:
Diffable.diffmethod fails to validate git options passed throughkwargs, which can lead to arbitrary file writes (bsc#1275753). - CVE-2026-73625:
check_unsafe_optionsguard bypass via smuggling of git options inside single-characterkwargvalues can lead to arbitrary code execution (bsc#1275754). - CVE-2026-76217: failure to validate options passed to
git rmandgit checkoutcommands inIndexFile.remove()andHead.checkout()can lead to arbitrary file reads (bsc#1275745). - CVE-2026-76218: unguarded git option forwarding in
Repo.initallows for arbitrary command execution (bsc#1275746). - CVE-2026-76219: unguarded
git read-treeoption forwarding inIndexFile.from_tree/reset/merge_treecan lead to arbitrary file overwrites (bsc#1275747). - CVE-2026-76220:
check_unsafe_optionsguard can be bypassed by combining a single-characterkwargwithsplit_single_char_options=False, which can lead to arbitrary OS command injection (bsc#1275748). - CVE-2026-76221:
config-nameinjection in theoption-namevalidator can lead to remote code execution (bsc#1275749). - CVE-2026-76222: failure to validate submodule names from
.gitmodulesfiles allows creation of Git repositories at arbitrary filesystem paths outside the intended clone directory (bsc#1275750). - CVE-2026-78675: failure to disable
merge_includeswhen parsing.gitmodulescan lead to discloseure of local file contents when arbitrary file paths are included via[include]directives (bsc#1276434). - CVE-2026-78676: failure to safely re-serialize multi-line
git-configvalues during write operations can corrupt dormant quoted values into live injected directives (bsc#1276433). - CVE-2026-78677: omission of
--separate-git-dirfromunsafe_git_clone_optionsallows for creation of arbitrary git directories outside the intended clone destination (bsc#1276432). - CVE-2026-78678: incomplete denylist in the
unsafe_git_revision_optionsguard that omits--contentsand-Soptions allows for reading of arbitrary files when these options to are passed toRepo.blame()(bsc#1276431). - CVE-2026-78679: positional reference parameter can bypass an unsafe option guard and allows for arbitrary file read via…
- Record
openSUSE-SU-2026:21874-1- Updated
- 2026-11-02
OSVROOT-APP-PYPI-CVE-2026-78675 No score
CVE-2026-78675 in gitpython - Patched by Root
Root has patched CVE-2026-78675 in the gitpython package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-CVE-2026-78675- Updated
- 2026-11-02
OSVROOT-APP-PYPI-GHSA-crmc-f4m7-33fj No score
GHSA-crmc-f4m7-33fj in GitPython - Patched by Root
Root has patched GHSA-crmc-f4m7-33fj in the GitPython package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-GHSA-crmc-f4m7-33fj- Updated
- 2026-11-02
OSVSUSE-SU-2026:4072-1 No score
Security update for python-GitPython
This update for python-GitPython fixes the following issues:
- CVE-2026-42215: command injection via Git options bypass (bsc#1264604).
- CVE-2026-42284: unsafe option check validates multi_options before shlex.split transforms it (bsc#1264605).
- CVE-2026-44243: path traversal in GitPython reference APIs allows arbitrary file write and delete outside the repository (bsc#1264606).
- CVE-2026-44244: newline injection in config_writer().set_value() enables RCE via core.hooksPath (bsc#1264608).
- CVE-2026-67322: vulnerable to environment-variable exfiltration in Repo.clone_from() (bsc#1273357).
- CVE-2026-67323: fails to guard against dangerous Git options passed as keyword arguments in Repo.archive() and git.ls_remote() (bsc#1273358).
- CVE-2026-67325: contains an incomplete command injection blocklist that fails to account for git's long-option prefix abbreviation feature (bsc#1273359).
- CVE-2026-67326: fails to validate newline characters in the section parameter of config_writer() (bsc#1273364).
- CVE-2026-69097: fails to properly escape section names in git config files, allowing attackers to inject arbitrary configuration directives through malicious submodule names (bsc#1273414).
- CVE-2026-73619: incomplete denylist in the
unsafe_git_archive_optionsguard that omits--add-fileand--add- virtual-fileoptions can lead to arbitrary file reads (bsc#1275755). - CVE-2026-73620: failure to guard git option forwarding in
IndexFile.checkout()andTagReference.create()can lead to arbitrary file reads and writes (bsc#1275756). - CVE-2026-73621: argument injection in the
Commit.count()method allows for destruction/blanking of arbitrary files (bsc#1275757). - CVE-2026-73622: failure to disable environment variable expansion in
Remote.create()andSubmodule.add()URL handling allows for secret exfiltration via URLs containing variable references (bsc#1275751). - CVE-2026-73623: incomplete denylist in
unsafe_git_clone_optionsthat omits--templateallows for arbitrary command execution (bsc#1275752). - CVE-2026-73624:
Diffable.diffmethod fails to validate git options passed throughkwargs, which can lead to arbitrary file writes (bsc#1275753). - CVE-2026-73625:
check_unsafe_optionsguard bypass via smuggling of git options inside single-characterkwargvalues can lead to arbitrary code execution (bsc#1275754). - CVE-2026-76217: failure to validate options passed to
git rmandgit checkoutcommands inIndexFile.remove()andHead.checkout()can lead to arbitrary file reads (bsc#1275745). - CVE-2026-76218: unguarded git option forwarding in
Repo.initallows for arbitrary command execution (bsc#1275746). - CVE-2026-76219: unguarded
git read-treeoption forwarding inIndexFile.from_tree/reset/merge_treecan lead to arbitrary file overwrites (bsc#1275747). - CVE-2026-76220:
check_unsafe_optionsguard can be bypassed by combining a single-characterkwargwithsplit_single_char_options=False, which can lead to arbitrary OS command injection (bsc#1275748). - CVE-2026-76221:
config-nameinjection in theoption-namevalidator can lead to remote code execution (bsc#1275749). - CVE-2026-76222: failure to validate submodule names from
.gitmodulesfiles allows creation of Git repositories at arbitrary filesystem paths outside the intended clone directory (bsc#1275750). - CVE-2026-78675: fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives (bsc#1276434).
- CVE-2026-78676: fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives (bsc#1276433).
- CVE-2026-78677: allowing creation of arbitrary git directories outside the intended clone destination (bsc#1276432).
- CVE-2026-78678: an incomplete denylist in the unsafe_git_revision_options guard that omits --contents…
- Record
SUSE-SU-2026:4072-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gitpythonPyPI |
through 3.1.58 | 3.1.59 |
py3-gitpythonAlpine:v3.24 |
before 3.1.61-r0 | 3.1.61-r0 |
gitpythonTuxCare:PyPI From an advisory covering 5 CVEs |
3.1.31 up to 3.1.31.post12+tuxcare, plus listed versions 3.1.31.post1+tuxcare3.1.31.post10+tuxcare3.1.31.post11+tuxcare3.1.31.post2+tuxcare3.1.31.post3+tuxcare Show 6 moreShow less3.1.31.post4+tuxcare3.1.31.post5+tuxcare3.1.31.post6+tuxcare3.1.31.post7+tuxcare3.1.31.post8+tuxcare3.1.31.post9+tuxcare |
3.1.31.post12+tuxcare |
python-gitDebian:12 |
before 3.1.30-1+deb12u3, plus listed versions 3.1.30-13.1.30-1+deb12u2 |
3.1.30-1+deb12u3 |
python-gitDebian:13 |
before 3.1.44-1+deb13u1, plus listed versions 3.1.44-1 |
3.1.44-1+deb13u1 |
python-gitDebian:14 |
before 3.1.61-1, plus listed versions 3.1.44-13.1.45-13.1.46-13.1.50-1 |
3.1.61-1 |
gitpythonPyPI |
before 3.1.59, plus listed versions 0.1.70.2.0-beta10.3.0-beta10.3.0-beta20.3.1-beta2 Show 45 moreShow less0.3.20.3.2.10.3.2.RC10.3.30.3.40.3.50.3.60.3.71.0.01.0.11.0.22.0.02.0.12.0.22.0.32.0.42.0.52.0.62.0.72.0.82.0.92.0.9.dev02.0.9.dev12.1.02.1.12.1.102.1.112.1.122.1.132.1.142.1.152.1.22.1.32.1.42.1.52.1.62.1.72.1.82.1.93.0.03.0.13.0.23.0.33.0.43.0.5 |
3.1.59 |
python-GitPythonopenEuler:24.03-LTS-SP1 From an advisory covering 17 CVEs |
before 3.1.59-1.oe2403sp1 | 3.1.59-1.oe2403sp1 |
python-GitPythonopenEuler:24.03-LTS-SP3 From an advisory covering 17 CVEs |
before 3.1.59-1.oe2403sp3 | 3.1.59-1.oe2403sp3 |
python-GitPythonopenEuler:24.03-LTS-SP4 From an advisory covering 17 CVEs |
before 3.1.59-1.oe2403sp4 | 3.1.59-1.oe2403sp4 |
Show 15 moreShow less
| Package | Affected | Fixed |
|---|---|---|
gitpythonRoot:PyPI |
before 3.1.47+aikido.3 | 3.1.47+aikido.3 |
GitPythonRoot:PyPI |
before 3.1.47+aikido.9 | 3.1.47+aikido.93.1.46+aikido.123.1.58+aikido.33.1.46+aikido.13 |
GitPythonRoot:PyPI |
before 3.1.47+aikido.8 | 3.1.47+aikido.83.1.47+aikido.93.1.46+aikido.123.1.58+aikido.13.1.58+aikido.23.1.58+aikido.33.1.46+aikido.113.1.46+aikido.13 |
python-GitPythonSUSE:Linux Enterprise Module for Python 3 15 SP7 From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server 15 SP4-LTSS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server 15 SP5-LTSS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server 15 SP6-LTSS From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server for SAP Applications 15 SP4 From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server for SAP Applications 15 SP5 From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonSUSE:Linux Enterprise Server for SAP Applications 15 SP6 From an advisory covering 27 CVEs |
before 3.1.34.1693646983.2a2ae77-150400.9.8.1 | 3.1.34.1693646983.2a2ae77-150400.9.8.1 |
python-GitPythonopenSUSE:Leap 16.0 From an advisory covering 26 CVEs |
before 3.1.44-160000.4.1 | 3.1.44-160000.4.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| affected | ||
| affected, aliases, references | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-78675 is a high vulnerability (CVSS 8.6) in Gitpython-developers Gitpython, published August 25, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.18%, the 7th percentile. Fixed in gitpython 3.1.59.
References
github.com/gitpython-developers/GitPython/security/advisories/GHSA-7833-fr7j-v32q
vulncheck.com/advisories/gitpython-before-local-file-content-disclosure-via-gitmodules
nvd.nist.gov/vuln/detail/CVE-2026-78675
github.com/gitpython-developers/GitPython/pull/2211
github.com/gitpython-developers/GitPython/commit/ef7568e3b317ce617eacda39b8b54dcdff8c3b5c
github.com/gitpython-developers/GitPython/releases/tag/3.1.59
Show 88 moreShow less
github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3785.yaml
github.com/advisories/GHSA-7833-fr7j-v32q
github.com/advisories/GHSA-crmc-f4m7-33fj
security.alpinelinux.org/vuln/CVE-2026-78675
github.com/CVEProject/cvelistV5/tree/main/cves/2026/78xxx/CVE-2026-78675.json
security-tracker.debian.org/tracker/CVE-2026-78675
github.com/gitpython-developers/GitPython
openeuler.org/zh/security/security-bulletins/detail?id=openEuler-SA-2026-3699
nvd.nist.gov/vuln/detail/CVE-2026-73619
nvd.nist.gov/vuln/detail/CVE-2026-73620
nvd.nist.gov/vuln/detail/CVE-2026-73621
nvd.nist.gov/vuln/detail/CVE-2026-73622
nvd.nist.gov/vuln/detail/CVE-2026-73623
nvd.nist.gov/vuln/detail/CVE-2026-73624
nvd.nist.gov/vuln/detail/CVE-2026-73625
nvd.nist.gov/vuln/detail/CVE-2026-76217
nvd.nist.gov/vuln/detail/CVE-2026-76218
nvd.nist.gov/vuln/detail/CVE-2026-76219
nvd.nist.gov/vuln/detail/CVE-2026-76220
nvd.nist.gov/vuln/detail/CVE-2026-76221
nvd.nist.gov/vuln/detail/CVE-2026-76222
nvd.nist.gov/vuln/detail/CVE-2026-78676
nvd.nist.gov/vuln/detail/CVE-2026-78677
nvd.nist.gov/vuln/detail/CVE-2026-78679
openeuler.org/zh/security/security-bulletins/detail?id=openEuler-SA-2026-3700
openeuler.org/zh/security/security-bulletins/detail?id=openEuler-SA-2026-3721
suse.com/support/update/announcement/2026/suse-su-20264072-1
bugzilla.suse.com/1264604
bugzilla.suse.com/1264605
bugzilla.suse.com/1264606
bugzilla.suse.com/1264608
bugzilla.suse.com/1273357
bugzilla.suse.com/1273358
bugzilla.suse.com/1273359
bugzilla.suse.com/1273364
bugzilla.suse.com/1273414
bugzilla.suse.com/1273498
bugzilla.suse.com/1275745
bugzilla.suse.com/1275746
bugzilla.suse.com/1275747
bugzilla.suse.com/1275748
bugzilla.suse.com/1275749
bugzilla.suse.com/1275750
bugzilla.suse.com/1275751
bugzilla.suse.com/1275752
bugzilla.suse.com/1275753
bugzilla.suse.com/1275754
bugzilla.suse.com/1275755
bugzilla.suse.com/1275756
bugzilla.suse.com/1275757
bugzilla.suse.com/1276430
bugzilla.suse.com/1276431
bugzilla.suse.com/1276432
bugzilla.suse.com/1276433
bugzilla.suse.com/1276434
suse.com/security/cve/CVE-2026-42215
suse.com/security/cve/CVE-2026-42284
suse.com/security/cve/CVE-2026-44243
suse.com/security/cve/CVE-2026-44244
suse.com/security/cve/CVE-2026-67322
suse.com/security/cve/CVE-2026-67323
suse.com/security/cve/CVE-2026-67325
suse.com/security/cve/CVE-2026-67326
suse.com/security/cve/CVE-2026-69097
suse.com/security/cve/CVE-2026-73619
suse.com/security/cve/CVE-2026-73620
suse.com/security/cve/CVE-2026-73621
suse.com/security/cve/CVE-2026-73622
suse.com/security/cve/CVE-2026-73623
suse.com/security/cve/CVE-2026-73624
suse.com/security/cve/CVE-2026-73625
suse.com/security/cve/CVE-2026-76217
suse.com/security/cve/CVE-2026-76218
suse.com/security/cve/CVE-2026-76219
suse.com/security/cve/CVE-2026-76220
suse.com/security/cve/CVE-2026-76221
suse.com/security/cve/CVE-2026-76222
suse.com/security/cve/CVE-2026-78675
suse.com/security/cve/CVE-2026-78676
suse.com/security/cve/CVE-2026-78677
suse.com/security/cve/CVE-2026-78678
suse.com/security/cve/CVE-2026-78679
bugzilla.suse.com/1279905
bugzilla.suse.com/1279906
bugzilla.suse.com/1279907
suse.com/security/cve/CVE-2026-87817
suse.com/security/cve/CVE-2026-87818
suse.com/security/cve/CVE-2026-87819
Left out here: 61 versions and the rest of 7 source descriptions. The JSON record has them.