Skip to main content

Snowflake cli: GitPython: Unguarded git option forwarding in Repo.init enables arbitrary command execution via --template clone hooks (CVE-2026-76218)

0
High
Published: 08/20/2026 (08/20/2026, 09:40:01 UTC)
Source: GCVE Database
Product: snowflake-cli

Description

GitPython's Repo.init method forwards all keyword arguments directly to git init without guarding unsafe options. This allows an attacker who can control the 'template' argument to plant malicious git hooks that execute arbitrary code during subsequent git operations. The vulnerability affects GitPython versions from 3.4.1 up to but not including 3.25.0. The attack requires the attacker to stage an executable hook directory at a known path and have the application call Repo.init with a crafted template argument. A patch is available that adds a guard against unsafe options like --template.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Homebrewmore threats →ghsa
snowflake-cli
pkg:brew/snowflake-cli
Affected versions
>=3.4.1 <3.25.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 05:01:35 UTC

Technical Analysis

The vulnerability in GitPython's Repo.init method (CVE-2026-76218) arises because it forwards **kwargs verbatim to 'git init' without checking for unsafe options. Specifically, the '--template' option allows copying attacker-controlled hooks into the new repository's .git/hooks directory, enabling arbitrary code execution on the next git operation. Unlike the clone path, which already has unsafe option guards, Repo.init lacks any such protection. Exploitation requires the attacker to stage an executable hook directory and influence the template argument passed to Repo.init. The issue affects GitPython versions >=3.4.1 and <3.25.0. The recommended fix is to add a check_unsafe_options guard with a denylist including '--template' and '--separate-git-dir'.

Potential Impact

Successful exploitation results in arbitrary code execution with the privileges of the host process when the next git operation triggers the malicious hook. The attack complexity is high because the attacker must control the template argument and stage an executable hook directory at a known path. Confidentiality, integrity, and availability impacts are all high due to arbitrary code execution.

Mitigation Recommendations

A patch is available that introduces a check_unsafe_options guard in Repo.init to block unsafe options such as '--template' and '--separate-git-dir'. Users should upgrade GitPython to a fixed version beyond 3.25.0. Until patched, avoid passing untrusted input to the template argument in Repo.init calls. No other mitigations are indicated by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-snowflake-cli-CVE-2026-76218
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6abb41aef7a7c54106cc3a6e

Added to database: 09/29/2026, 04:42:22 UTC

Last enriched: 09/29/2026, 05:01:35 UTC

Last updated: 09/29/2026, 05:01:35 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses