GitPython can plant a hook that runs code on the next Git command
A library that programs use to work with Git repositories can be tricked into placing a script inside the repository's hidden hooks folder. Git then runs that script automatically during normal operations, so an attacker's code can run on t
| Severity | HighCVSS 7.5 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | YesGitPython 3.2.1 · since 25 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker supplies submoduleMalicious repo with a post-checkout file
- 2App calls create_submodulePath set to .git/hooks
- 3Clone lands in hooks dirClone runs before path is rejected
- 4Git operation runs hookNext checkout executes the script
- ResultAttacker code runs on the machine
What happened
create_submodule() in GitPython accepts a path of '.git/hooks' and clones an attacker-supplied submodule into the live hooks directory before the path check rejects it, leaving an executable post-checkout hook behind (CWE-style path validation ordering flaw).
Are you affected?
You are affected if you use GitPython 3.2.0 or earlier (including 3.1.x) and your application accepts untrusted submodule paths or URLs passed to create_submodule().
| Package / product | Affected versions | Fixed in |
|---|---|---|
| Gitpython · pip | <= 3.2.0 | 3.2.1 |
What to do
- Update GitPython to 3.2.1 or later (pip install --upgrade gitpython)
- Do not pass untrusted paths or URLs into create_submodule() until the update is applied
- Review .git/hooks in repositories processed by affected code for unexpected executable files
Timeline
- 21 Oct 2026, 21:17 UTCPublicly disclosed
- 21 Oct 2026, 21:17 UTCReported by NVD · NVD
- 22 Oct 2026, 16:41 UTCReported by GitHub Advisory · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- NVD21 Oct 2026, 21:17 UTC
- GitHub Advisory22 Oct 2026, 16:41 UTC
Technical details
- ID
- CVE-2026-114145 · GHSA-83vg-56qc-22m7
- CVSS
- 7.5 / 10
- EPSS
- 0.4% chance of exploitation within 30 days
- Disclosed
- 21 Oct 2026, 21:17 UTC
- On Zero Radar
- before the radar started
- Last change
- 25 Oct 2026, 13:32 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works