Zero Radar
← feed
HighVulnerabilityCVE-2026-114145updated 25 Oct 2026, 13:32 UTC

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

Fixed in GitPython 3.2.1Official, 2 sources
SeverityHighCVSS 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

  1. 1Attacker supplies submoduleMalicious repo with a post-checkout file
  2. 2App calls create_submodulePath set to .git/hooks
  3. 3Clone lands in hooks dirClone runs before path is rejected
  4. 4Git operation runs hookNext checkout executes the script
  5. 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).

Why it is dangerous: Successful exploitation gives code execution on any system where an application passes untrusted submodule paths to GitPython, such as build servers or tools that accept repository input.

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 / productAffected versionsFixed in
Gitpython · pip<= 3.2.03.2.1

What to do

  1. Update GitPython to 3.2.1 or later (pip install --upgrade gitpython)
  2. Do not pass untrusted paths or URLs into create_submodule() until the update is applied
  3. Review .git/hooks in repositories processed by affected code for unexpected executable files

Timeline

  1. 21 Oct 2026, 21:17 UTC
    Publicly disclosed
  2. 21 Oct 2026, 21:17 UTC
    Reported by NVD · NVD
  3. 22 Oct 2026, 16:41 UTC
    Reported by GitHub Advisory · GitHub Advisory

Sources 2 reports, oldest first

Official vendor, government CERT or advisory database

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

GitPython can plant a hook that runs code on the next Git command · Zero Radar