CVE-2026-78677: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in gitpython-developers GitPython
GitPython versions prior to 3.1.59 contain a path traversal vulnerability that allows attackers to create arbitrary git directories outside the intended clone destination. This occurs because the --separate-git-dir option is omitted from unsafe_git_clone_options, enabling attackers to redirect repository metadata to attacker-controlled filesystem paths via the separate_git_dir parameter in Repo.clone_from() or Repo.clone(). This can lead to arbitrary directory creation and potential execution of hooks.
AI Analysis
Technical Summary
GitPython before version 3.1.59 improperly limits pathname restrictions in its cloning functionality. Specifically, the omission of the --separate-git-dir option from unsafe_git_clone_options allows attackers to specify a separate_git_dir parameter that redirects repository metadata outside the intended clone destination. This path traversal vulnerability enables attackers to create arbitrary directories on the filesystem and potentially execute malicious hooks.
Potential Impact
An attacker can exploit this vulnerability to create arbitrary directories outside the intended clone location, which may lead to unauthorized file system modifications and potential execution of malicious git hooks. This could compromise the integrity and security of the system where GitPython is used.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted input for the separate_git_dir parameter in Repo.clone_from() or Repo.clone(), or restrict usage to trusted sources only.
CVE-2026-78677: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in gitpython-developers GitPython
Description
GitPython versions prior to 3.1.59 contain a path traversal vulnerability that allows attackers to create arbitrary git directories outside the intended clone destination. This occurs because the --separate-git-dir option is omitted from unsafe_git_clone_options, enabling attackers to redirect repository metadata to attacker-controlled filesystem paths via the separate_git_dir parameter in Repo.clone_from() or Repo.clone(). This can lead to arbitrary directory creation and potential execution of hooks.
CVSS v4.0
Score 8.7high
Affected software
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
Technical Analysis
GitPython before version 3.1.59 improperly limits pathname restrictions in its cloning functionality. Specifically, the omission of the --separate-git-dir option from unsafe_git_clone_options allows attackers to specify a separate_git_dir parameter that redirects repository metadata outside the intended clone destination. This path traversal vulnerability enables attackers to create arbitrary directories on the filesystem and potentially execute malicious hooks.
Potential Impact
An attacker can exploit this vulnerability to create arbitrary directories outside the intended clone location, which may lead to unauthorized file system modifications and potential execution of malicious git hooks. This could compromise the integrity and security of the system where GitPython is used.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted input for the separate_git_dir parameter in Repo.clone_from() or Repo.clone(), or restrict usage to trusted sources only.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-25T01:17:12.262Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a8cf57dacd9273b498428de
Added to database: 08/25/2026, 01:53:01 UTC
Last enriched: 08/25/2026, 02:07:18 UTC
Last updated: 08/25/2026, 02:15:18 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.