PortGate

Advisories · Linux & SSH

CVE-2024-32002 High CVSS 9.0

Git recursive clone code execution

Disclosed 2024 · Last reviewed 2 Dec 2026

A recursive clone of an untrusted repository could run code on the machine that ran the clone.

What happened

Submodule paths could be arranged so that a hook ran during the clone.

Affected and patched versions

Affected
Git before 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, and 2.40.2 when cloning with submodules.
Patched
Those six patch releases and later Git.

How to check your server

Check

git --version

How to fix and harden

  1. Run git --version.
  2. Upgrade Git from the distribution. Several older lines were patched, so a version below 2.45.1 can still be the fixed build for that line.
  3. Do not recursively clone repositories you do not trust.

Fix

git --version

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON