CVE-2026-114145: GitPython submodule path validation can enable code execution

gitpython Updated 22 Oct 2026

Summary

22/10/2026
Yes i
High
7.5

CVE-2026-114145: Attacker-controlled submodule paths can plant executable Git hooks, enabling arbitrary code execution during a later Git operation. Affects gitpython versions < 3.2.1. Fixed in 3.2.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

GitPython is a Python library in the PyPI ecosystem for interacting with Git repositories. It provides repository operations through Python, including creating and managing submodules. Applications use it to automate Git workflows and process repository data, including submodule specifications supplied by users or other external sources.

Vulnerability Detail

Attacker-controlled submodule paths can lead to arbitrary code execution when Git later runs a planted hook. In GitPython, create_submodule clones into the requested path before strict validation rejects a .git alias such as .git/hooks. The clone can place an executable post-checkout hook in the repository’s live hooks directory. The issue affects versions through 3.2.0; validation may raise an error after the filesystem has already been modified.

How To Fix

Latest published version: 3.2.1 as of 23 Oct 2026

pip install --upgrade "gitpython==3.2.1"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

AI-generated workaround (not vendor-documented): GitPython applications should reject submodule paths that target .git or its descendants before calling create_submodule. Accept only paths within an explicitly permitted repository subdirectory.

Documented mitigation:

create_submodule(name, path, url)

Conclusion

Upgrade GitPython to 3.2.1, the minimum fixed version. Until upgrading, reject submodule paths that target .git or its descendants before creating submodules. Review applications that accept submodule paths from untrusted sources and assess whether affected versions were used. Vulert monitors the dependencies in Pipfile.lock and alerts when a new vulnerability affects them; check an application at https://vulert.com/scanner.

See every vulnerability recorded for gitpython →

Share this vulnerability

FAQ

GitPython versions through 3.2.0 are affected, including the reported 3.1.x and 3.2.0 lines.

CVE-2026-114145 can let an attacker plant an executable Git hook that runs during a later Git operation.

Upgrade GitPython to the minimum fixed version, 3.2.1.

Reject submodule paths targeting .git or its descendants before calling GitPython’s create_submodule.

Inspect Pipfile.lock for GitPython and check its resolved version. Vulert can scan a manifest or SBOM and monitor the dependency at Vulert Scanner.

Related vulnerabilities

Recent vulnerabilities recorded for gitpython.

How To Fix

Latest published version: 3.2.1 as of 23 Oct 2026

pip install --upgrade "gitpython==3.2.1"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback