GitPython: some git commands skip safety checks, allowing command injection
GitPython is a Python library that runs git for you. A few of its helper functions pass user-supplied text straight to git without the usual safety checks. A crafted repository address or option could make git run commands on your machine.
| Severity | HighCVSS 7.5 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | YesGitPython 3.2.0 · since 27 Oct 2026 |
| How sure is this? | Official sourceBacked by an official source |
How the attack works simplified
- 1Crafted URLAttacker supplies an ext:: address
- 2ls_remote callApp probes URL without the safety check
- 3git runsgit executes the ext helper command
- 4Command runsAttacker code runs on the host
- ResultAttacker runs commands on the machine
What happened
In GitPython up to 3.1.62, Git.ls_remote forwards the URL without the unsafe-protocol check (ext:: remote-helper URLs), and Repo.merge_base and IndexFile.move forward keyword arguments to git without the unsafe-option check. This allows argument injection and, for ls_remote, command execution when git permits the ext transport.
Are you affected?
You are affected if you use GitPython 3.1.62 or earlier and call Git.ls_remote with untrusted URLs, or call Repo.merge_base or IndexFile.move with untrusted keyword arguments.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| GitPython · pip | <= 3.1.62 | 3.2.0 |
What to do
- Update GitPython to 3.2.0 or later
- Do not pass untrusted URLs to Git.ls_remote until you have updated
- Upgrade git to 2.38.1 or later to block the ext:: transport by default
Timeline
- 27 Oct 2026, 15:26 UTCPublicly disclosed
- 27 Oct 2026, 15:26 UTCReported by GitHub Advisory · GitHub Advisory
- 27 Oct 2026, 15:27 UTCPicked up by Zero Radar
Sources 1 report, oldest first
Official vendor, government CERT or advisory database
- GitPython command wrappers omit unsafe protocol and option checksGitHub Advisory · 27 Oct 2026, 15:26 UTC
Technical details
- ID
- GHSA-w8jc-g24h-crhw
- CVSS
- 7.5 / 10
- Disclosed
- 27 Oct 2026, 15:26 UTC
- On Zero Radar
- 27 Oct 2026, 15:27 UTC (1 min after disclosure)
- Last change
- 27 Oct 2026, 15:27 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