Skip to content
OpenAdvisories
Low · 3.9 CVE-2024-32021 EUVD-2024-29859

Local Git clone may hardlink arbitrary user-readable files into the new repository's "objects/" directory

Published May 14, 2024 · Updated Nov 4, 2025 · Assigned by GitHub_M

Description

Git is a revision control system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4, when cloning a local source repository that contains symlinks via the filesystem, Git may create hardlinks to arbitrary user-readable files on the same filesystem as the target repository in the `objects/` directory. Cloning a local repository over the filesystem may creating hardlinks to arbitrary user-owned files on the same filesystem in the target Git repository's `objects/` directory. When cloning a repository over the filesystem (without explicitly specifying the `file://` protocol or `--no-local`), the optimizations for local cloning
will be used, which include attempting to hard link the object files instead of copying them. While the code includes checks against symbolic links in the source repository, which were added during the fix for CVE-2022-39253, these checks can still be raced because the hard link operation ultimately follows symlinks. If the object on the filesystem appears as a file during the check, and then a symlink during the operation, this will allow the adversary to bypass the check and create hardlinks in the destination objects directory to arbitrary, user-readable files. The problem has been patched in versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4.

Affected products

VendorProductAffectedFixed
git git = 2.45.0, = 2.44.0, >= 2.43.0, < 2.43.4, >= 2.42.0, < 2.42.2, = 2.41.0, >= 2.40.0, < 2.40.2, < 2.39.4 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 git 1:2.45.1-1 —
Debian 13 git 1:2.45.1-1 —
Debian 12 git 1:2.39.5-0+deb12u1 DSA-5769-1
Debian 11 git 1:2.30.2-1+deb11u3 DLA-3867-1
Debian 10 git 1:2.20.1-2+deb10u9 DLA-3844-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS git 1:2.43.0-1ubuntu7.1 USN-6793-1
Ubuntu 22.04 LTS git 1:2.34.1-1ubuntu1.11 USN-6793-1
Ubuntu 20.04 LTS git 1:2.25.1-1ubuntu3.12 USN-6793-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS git 1:2.17.1-1ubuntu0.18+esm1 USN-7023-1
Ubuntu Pro 16.04 LTS git 1:2.7.4-0ubuntu1.10+esm8 USN-7023-1
ReleasePackageFixed inAdvisory
RHEL 9 git +14 2.43.5-1.el9_4 RHSA-2024:4083
RHEL 8 git +14 2.43.5-1.el8_10 RHSA-2024:4084
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.2 EUS git +14 2.39.5-1.el9_2 RHSA-2024:4368

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 git +14 2.43.5-1.el9_4 ALSA-2024:4083
AlmaLinux 8 git +14 2.43.5-1.el8_10 ALSA-2024:4084

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 git 2.43.5-1.el9_4 RLSA-2024:4083
Rocky Linux 8 git 2.43.5-1.el8_10 RLSA-2024:4084
ReleasePackageFixed inAdvisory
SLES 15 SP6 git 2.43.0-150600.3.3.1 SUSE-SU-2024:2277-1
SLES 15 SP5 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLES 15 SP4 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLES 15 SP3 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLES 15 SP2 git 2.26.2-150000.56.1 SUSE-SU-2024:1854-1
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 git 2.26.2-27.78.1 SUSE-SU-2025:0197-1
SLES for SAP 15 SP4 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLES for SAP 15 SP3 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLES for SAP 15 SP2 git 2.26.2-150000.56.1 SUSE-SU-2024:1854-1
SLE Micro 6.0 git 2.45.1-1.1 SUSE-SU-2025:20049-1
SLE Micro 5.5 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-2, SUSE-SU-2024:1807-1
SLE HPC 15 SP4 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLE HPC 15 SP3 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SLE HPC 15 SP2 git 2.26.2-150000.56.1 SUSE-SU-2024:1854-1
SUSE Manager Server 4.3 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SUSE Manager Proxy 4.3 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
SUSE Enterprise Storage 7.1 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed git 2.45.1-1.1 openSUSE-SU-2024:13968-1
openSUSE Leap 15.6 git 2.43.0-150600.3.3.1 SUSE-SU-2024:2277-1
openSUSE Leap 15.5 git 2.35.3-150300.10.39.1 SUSE-SU-2024:1807-1
ReleasePackageFixed inAdvisory
Alpine v3.24 git 2.45.1-r0 —
Alpine v3.23 git 2.45.1-r0 —
Alpine v3.22 git 2.45.1-r0 —
Alpine v3.21 git 2.45.1-r0 —
Alpine v3.20 git 2.45.1-r0 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 git 2.43.4-r0 —
Alpine v3.18 git 2.40.3-r0 —
Alpine v3.17 git 2.39.5-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 git +16 2.40.1-1.amzn2023.0.3 ALAS2023-2024-623
Amazon Linux 2 git +16 2.40.1-1.amzn2.0.3 ALAS2-2024-2548

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 git 2.45.2-1 —
Azure Linux 2 (CBL-Mariner) git 2.39.4-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 git +14 2.43.5-1.el9_4 ELSA-2024-4083
Oracle Linux 8 git +14 2.43.5-1.el8_10 ELSA-2024-4084

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling git 2.45.1-r0 —

Advisories 25

References