Sceawere

Vulnerability Detail

CVE-2026-76219UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

GitPython Arbitrary File Overwrite Vulnerability

Vulnerability Metadata

Severity
High
Score / CVSS
8.1
Creation Date
3h ago
Vendor
gitpython-developers
Product
GitPython
Attack Type
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Attack Complexity
LOW

Narrative and Response

Description

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 overwrite arbitrary files with a valid git-index blob, destroying existing file content at attacker-controlled writable paths.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "8.1",
  "pubDate": "2026-08-19T14:17:48.187Z",
  "pubdate": "2026-08-19T14:17:48.187Z",
  "executiveSummary": "GitPython versions before 3.1.58 are vulnerable to an arbitrary file overwrite security flaw affecting multiple internal methods. The vulnerability arises from the insecure handling of caller-influenced treeish strings passed directly to the underlying git read-tree command without adequate option validation or argument separation. This flaw enables malicious actors to inject unintended command-line options, specifically the --index-output parameter, into the execution flow.\nSuccessful exploitation of this vulnerability allows an attacker to overwrite arbitrary files on the host filesystem with a valid git-index binary blob. This results in the complete destruction and corruption of existing file contents at any writable path accessible to the executing process. The impact is severe, potentially causing data loss, application corruption, or localized denial of service depending on the targeted file paths.\nThe affected systems include any application or service utilizing GitPython versions prior to 3.1.58 to interact with Git repositories using the vulnerable methods. Exploitation requires the ability to supply malicious or crafted treeish strings to the affected functions. No specific authentication, privilege escalation, or network exposure is inherently required beyond the execution context of the vulnerable Python script handling untrusted inputs.",
  "technicalDetails": "The vulnerability resides in the GitPython library, specifically within the IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods. The root cause of the flaw is the lack of proper input validation, argument sanitization, and strict argument separation when appending caller-influenced treeish strings directly to git read-tree command invocations.\nWhen a user or application passes a maliciously crafted treeish string containing command-line options to IndexFile.from_tree, IndexFile.reset, or IndexFile.merge_tree, GitPython constructs the subprocess command without safely isolating the positional arguments from operational flags. This allows the string to inject arbitrary flags into the underlying git binary execution.\nAn attacker leverages this behavior by injecting the --index-output option followed by a target file path of their choice. During execution, the git read-tree process interprets the injected parameter and redirects the generation of the resulting git-index binary blob to the attacker-specified file path rather than the standard internal index location.\nThe payload behavior involves writing a valid git-index binary structure directly to the targeted file location on the filesystem. This post-exploitation impact causes the truncation and replacement of the original file contents with the binary blob, effectively destroying the existing data at the attacker-controlled writable path.\nThe affected software component is the IndexFile management module within GitPython. All versions preceding 3.1.58 are vulnerable. The exploitation does not rely on network exposure or complex authentication schemes; rather, it manifests locally wherever untrusted input reaches the vulnerable methods."
}
CVE-2026-76219: GitPython Arbitrary File Overwrite Vulnerability (HIGH Severity, CVSS: 8.1) - Sceawere