ZeroHour

CVE-2026-73623

PoC large

Command injection in GitPython via --template option during clone

CVSS 4.0
7.7 high
EPSS
<1%p60
Published
()
Modified
AI analysis

GitPython before 3.1.54 maintains an incomplete denylist in its unsafe_git_clone_options check that omits the --template option, allowing that argument to pass through into the underlying git clone command (CWE-78). An attacker who can influence the options supplied to a GitPython clone operation can specify --template pointing to a directory they control that contains a malicious post-checkout hook. When git performs the clone, the hook is executed, giving the attacker arbitrary command execution in the context of the process invoking GitPython. Affected parties are applications, services, and automation that clone repositories through GitPython using attacker-controlled URLs or extra clone options; deployments that only manage local, already-existing repositories via this library are not exposed through this path. The flaw is documented in a public GitHub security advisory with a reference PoC, it is not yet in CISA KEV, and EPSS assigns roughly a 1% probability of exploitation within 30 days (60th percentile), so no widespread in-the-wild exploitation is currently confirmed.

What to do: Upgrade to GitPython 3.1.54 or later. As an interim mitigation, validate or strip any user-controlled values passed as clone options and explicitly reject option-like inputs such as --template before calling clone/clone_from, and audit code paths where untrusted repository URLs or extra arguments flow into GitPython clone calls.

Affected
gitpython project gitpythonall versions before 3.1.54
Estimated exposure
largeon the order of hundreds of thousands of environments with the library installed (tens of millions of monthly PyPI downloads), though only deployments cloning… — GitPython is a widely depended-upon Python library with tens of millions of monthly PyPI downloads across CI/CD pipelines, code-analysis tooling, and security scanners, implying a very large installed base (roughly 10^5-10^6 environments),…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.

Vendors
gitpython project
Products
gitpython
Weakness
CWE-78
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.