Skip to content

← Actionable
High, CVSS 7.5amended

GitPython: Incomplete unsafe_git_clone_options denylist omits --template enabling arbitrary command execution via clone hooks

CVE-2026-73623GHSA-6p8h-3wgx-97gf

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (gitpython 3.1.54), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI gitpython

    Affected
    <= 3.1.53
    Fixed in
    3.1.54

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-73623: 0.96% estimated exploitation activity in the next 30 days; percentile 61.64 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary GitPython's unsafegitcloneoptions denylist omits --template. git clone --template=<dir copies <dir/hooks/ into the new repository and runs them (post-checkout fires during clone), so a caller who can influence clone options can achieve arbitrary command execution in the default allowunsafeoptions=False configuration. Root Cause base.py:145-152 defines unsafegitcloneoptions = ["--upload-pack","-u","--config","-c"] — --template is absent. The guard candidate ['--template'] passes checkunsafeoptions (verified). git copies the hook directory and executes post-checkout at checkout time. git's protocol.allow/GITALLOWPROTOCOL do not gate --template; the incomplete denylist is the only defense. Impact Arbitrary OS command execution during clone (default config). Requires an attacker-readable directory containing an executable hook — a genuine second precondition (realistic via shared filesystems, upload dirs, /tmp, or attacker-writable network paths), reflected as AC:H. Proof of…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-6p8h-3wgx-97gf

  2. Revision 1 · created ·

    Published from osv record GHSA-6p8h-3wgx-97gf

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-73623

Advisory: GitPython: Incomplete unsafe_git_clone_options denylist omits --template enabling arbitrary command execution via clone hooks
IDs: CVE-2026-73623, GHSA-6p8h-3wgx-97gf
Record: https://patchnext.com/advisories/cve-2026-73623 (revision 2, source checked 26 Oct 2026, 13:49 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: gitpython 3.1.54. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI gitpython: affected <= 3.1.53; fixed in 3.1.54

## Suggested inspection (read-only)
- `python -m pip show gitpython`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on gitpython.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-6p8h-3wgx-97gf (OSV record GHSA-6p8h-3wgx-97gf lists affected ranges: PyPI gitpython >=0 <3.1.54 (fixed))
- Verified: https://github.com/advisories/GHSA-6p8h-3wgx-97gf (GitHub-reviewed advisory GHSA-6p8h-3wgx-97gf lists affected ranges: PyPI gitpython >=0 <=3.1.53)

Commands are suggestions: review each one before running it.

Loading voting…