Skip to main content

GitPython CVE-2026-78676

| EUVDEUVD-2026-65222 CRITICAL
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-08-25 VulnCheck GHSA-284h-m62q-gf8w GHSA-9557-234j-7rv9 PYSEC-2026-3786
9.3
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
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
vuln.today AI
8.1 HIGH

Malicious config can arrive over the network (AV:N) with no auth (PR:N), but requires a dormant value plus a later unrelated config write and a hook-invoking op, so AC:H; full RCE gives C/I/A:H.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat
9.8 CRITICAL
qualitative

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

3
Patch available
Aug 25, 2026 - 03:16 EUVD
Analysis Generated
Aug 25, 2026 - 02:28 vuln.today
CVE Published
Aug 25, 2026 - 01:30 cve.org
CRITICAL 9.3

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 16 pypi packages depend on gitpython (13 direct, 3 indirect)

Ecosystem-wide dependent count for version 3.1.59.

DescriptionCVE.org

GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.

AnalysisAI

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config values: a dormant crafted value is silently rewritten into a live directive such as core.hooksPath whenever GitPython performs any unrelated config write. An attacker who can seed a malicious config value can thereby point hook execution at attacker-controlled code, gaining code execution the next time a hook-invoking git operation runs. Reported by VulnCheck (CWE-88) with a CVSS 4.0 base of 9.3; no public exploit or CISA KEV listing is identified at time of analysis.

Technical ContextAI

GitPython is a widely used pure-Python library for programmatic interaction with git repositories, including reading and writing .git/config and related INI-style configuration files. The root cause is CWE-88 (improper neutralization of argument/line delimiters): git config supports multi-line quoted string values, and GitPython's writer fails to safely re-quote/escape newline characters embedded in such values when it re-serializes the file. A value that was inert while quoted becomes, after a round-trip write, a syntactically distinct configuration line - e.g. an injected core.hooksPath entry. Because git executes scripts from the configured hooks path on ordinary operations (commit, checkout, etc.), converting a data value into a live config directive bridges a parsing flaw directly into command execution. The affected component per CPE is cpe:2.3:a:gitpython-developers:gitpython, all versions prior to 3.1.59.

RemediationAI

Vendor-released patch: upgrade GitPython to 3.1.59 or later, which corrects the unsafe re-serialization of multi-line quoted config values; this is the primary and recommended fix, per advisory GHSA-284h-m62q-gf8w (https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w). Pin the fixed version across all requirements files, lockfiles, and container images, since GitPython is frequently a transitive dependency. If you cannot upgrade immediately, apply compensating controls: avoid running GitPython against untrusted or externally supplied repositories and config files; where feasible run git operations with hooks disabled or a controlled hooks path (e.g. set core.hooksPath to a read-only, empty directory, or export GIT_CONFIG_NOSYSTEM and constrain per-repo config) so an injected core.hooksPath cannot reach attacker scripts - noting the side effect that legitimate hook-based workflows will stop firing; and isolate GitPython-driven automation in sandboxed, least-privilege runners so that any hook execution is contained. Consult the VulnCheck write-up (https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection) for detection guidance.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

CVE-2023-40267 CRITICAL
9.8 Aug 11

GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS

CVE-2026-67324 CRITICAL
9.3 Aug 01

Command execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-opti

CVE-2026-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

CVE-2026-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

CVE-2026-67323 HIGH POC
8.6 Aug 01

Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control

CVE-2026-73625 HIGH
8.7 Aug 13

Remote code execution in GitPython before 3.1.54 exploits a guard bypass in check_unsafe_options where the validation lo

CVE-2026-76220 HIGH POC
8.7 Aug 19

Arbitrary OS command execution in GitPython before 3.1.58 is possible by bypassing the check_unsafe_options guard using

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

Share

CVE-2026-78676 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy