Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GitPython unsafe clone option gate bypass through joined short options

0
High
Published: 07/21/2026 (07/21/2026, 19:43:14 UTC)
Source: GCVE Database
Product: GitPython

Description

GitPython version 3.1.50 contains a vulnerability where the default unsafe option gate intended to block dangerous git clone options does not recognize joined short-option forms such as '-u<value>'. This allows an attacker controlling clone options to bypass the safety check and execute local commands via Git's --upload-pack/-u option. The issue arises because the option canonicalization treats '-u<value>' as a different option name, allowing execution despite allow_unsafe_options being false. The vulnerability affects the PyPI package GitPython at version 3.1.50.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

PyPIghsa
GitPython
Affected versions
>=3.1.50 <3.1.51=3.1.50

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: 07/22/2026, 00:55:48 UTC

Technical Analysis

GitPython 3.1.50 attempts to block unsafe git clone options like --upload-pack (-u) by default unless allow_unsafe_options=True is set. However, the implementation does not properly canonicalize joined short options that take values, such as '-u/path/to/helper'. Git itself accepts '-u<upload-pack>' as equivalent to '--upload-pack=<upload-pack>', executing the helper command. GitPython's check splits multi_options but canonicalizes '-u<value>' to 'u<value>', which does not match the blocked 'u' option, allowing execution of the helper command despite the safety gate. This is a residual bypass of the explicit security boundary in GitPython's clone method. The vulnerability requires an attacker to control the multi_options argument passed to Repo.clone_from and relies on GitPython's default blocking behavior. The issue is confirmed with a local proof of concept that shows the helper script execution despite allow_unsafe_options=False. No patch or official fix is currently documented for this specific bypass in version 3.1.50.

Potential Impact

An attacker who can influence the multi_options parameter in GitPython's Repo.clone_from can bypass the default protection that blocks unsafe git clone options. This allows execution of arbitrary local commands via Git's --upload-pack/-u option during a clone operation. This bypass circumvents an explicit security boundary designed to prevent command execution without explicit allowance, potentially leading to local command execution in the context of the application using GitPython. The clone operation itself may fail if the helper exits nonzero, but the command execution side effect occurs, which could be leveraged for malicious purposes.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The suggested remediation is for GitPython to properly parse and canonicalize joined short options that take values (e.g., '-uVALUE' and '-cKEY=VALUE') to their base short option names before checking against the unsafe option set. Until a fix is released, users should avoid passing untrusted input to the multi_options parameter in Repo.clone_from or explicitly set allow_unsafe_options=True only when safe. Monitoring GitPython repository advisories and updates for a fix addressing this joined short option bypass is recommended.

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
GHSA-v396-v7q4-x2qj
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6a600ac39c2644c7f8fe33ad

Added to database: 07/22/2026, 00:11:47 UTC

Last enriched: 07/22/2026, 00:55:48 UTC

Last updated: 07/31/2026, 12:28:12 UTC

Views: 37

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