CVE-2026-76218
High · 7.5CVSS
7.5
EPSS
0.7%
Published
Aug 19, 2026
CISA due date
—
Cloudanix analysis
A flaw in a popular Python library for working with Git repositories can let attackers run their own programs on a computer if they trick the software into using a specially prepared folder.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Repo.init in GitPython forwards unvalidated git template options, allowing an attacker-supplied directory containing malicious hooks to be used during repository initialization; subsequent git operations trigger hook execution and arbitrary command execution.
Why it matters to the business
Attackers can gain remote code execution on systems that initialize repositories using untrusted template paths, leading to full system compromise, data theft, or ransomware deployment; the affected package is widely used in automation and CI pipelines, increasing exposure across development environments.
How an attack unfolds
An attacker crafts a malicious directory containing executable git hooks, then calls Repo.init with a template parameter pointing to that directory; when the initialized repository later performs git operations the hooks run, executing attacker-controlled commands on the host.
How to fix it
Upgrade python3.12-gitpython on Red Hat Enterprise Linux 9 to version 3.1.59-1.el9pc or later; avoid passing untrusted values to the template parameter until the fix is applied.
How to confirm the fix worked
Confirm the installed package version is at least 3.1.59-1.el9pc; test that Repo.init rejects or safely handles template paths containing executable hooks.
Typical attack path
- Identify a target application that calls GitPython Repo.init with a controllable template parameter
- Prepare a directory containing malicious git hook scripts
- Supply the malicious directory path via the template argument to Repo.init
- Trigger subsequent git operations on the created repository to execute the hooks
- Obtain code execution and pivot to persistence or lateral movement
How to detect it
Review application logs and process execution records for unexpected git hook activity or commands spawned during repository initialization; correlate with calls to Repo.init that reference external template directories.
What your security team should do
- Immediately upgrade affected GitPython packages to the fixed version
- Audit codebases for direct or indirect calls to Repo.init that accept user-controlled template values
- Implement input validation or sandboxing around repository initialization until patches are deployed
- Monitor for new exploit code or increased EPSS scores and reassess urgency
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-97350 Securepoint SSL VPN Client v2 on Windows contains vulnerabilities in the handling of… CWE-88
- CVE-2026-91909 Dell OpenManage Enterprise, versions prior to 4.8.0, contains an Improper Neutralization… CWE-88
- CVE-2026-62968 Dream Displays provides in-game screens for streaming videos in Minecraft. CWE-88
- CVE-2026-116252 pgAdmin 4's materialized view refresh passed the target database's name to psql's… CWE-88
- CVE-2026-111504 Dell OpenManage Enterprise, versions prior to 4.8.0, contains an Improper Neutralization… CWE-88
- CVE-2026-119282 Nx is a monorepo solution for TypeScript and polyglot codebases. CWE-88
- CVE-2026-90868 An OS command injection vulnerability in Progress Software WS_FTP Server versions prior… CWE-88
- CVE-2026-90865 An OS command injection vulnerability in Progress Software WS_FTP Server versions prior… CWE-88