Cloudanix VulnDB

CVE-2026-76218

High · 7.5

CVSS

7.5

EPSS

0.7%

Published

Aug 19, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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.

Exploit Available
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

  1. Identify a target application that calls GitPython Repo.init with a controllable template parameter
  2. Prepare a directory containing malicious git hook scripts
  3. Supply the malicious directory path via the template argument to Repo.init
  4. Trigger subsequent git operations on the created repository to execute the hooks
  5. 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