CVEfocus › CVE database › CVE-2024-32021

CVE-2024-32021Local Git clone may hardlink arbitrary user-readable files into the new repository's…

CVSS 3.9 LowEPSS 0.5% (higher than 34% of CVEs)Published 2024-05-14Updated 2025-11-04Assigner: GitHub_M

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.

CWE-547

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

76Fixed
16Fix pending
30Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04gitFixed1:2.43.0-1ubuntu7.1UBUNTU-CVE-2024-32021
Ubuntu 22.04gitFixed1:2.34.1-1ubuntu1.11UBUNTU-CVE-2024-32021
Ubuntu 20.04gitFixed1:2.25.1-1ubuntu3.12UBUNTU-CVE-2024-32021
Ubuntu 18.04gitFix pending1:2.17.1-1ubuntu0.18+esm1 (Ubuntu Pro)UBUNTU-CVE-2024-32021
Debian 14gitFixed1:2.45.1-1DEBIAN-CVE-2024-32021
Debian 13gitFixed1:2.45.1-1DEBIAN-CVE-2024-32021
Debian 12gitFixed1:2.39.5-0+deb12u1DEBIAN-CVE-2024-32021
Red Hat Enterprise Linux 10gitFix pending
Fix deferred
Red Hat Enterprise Linux 10git-allFix pending
Fix deferred
Red Hat Enterprise Linux 10git-coreFix pending
Fix deferred
Red Hat Enterprise Linux 10git-core-docFix pending
Fix deferred
Red Hat Enterprise Linux 10git-credential-libsecretFix pending
Fix deferred
Red Hat Enterprise Linux 10git-daemonFix pending
Fix deferred
Red Hat Enterprise Linux 10git-emailFix pending
Fix deferred
Red Hat Enterprise Linux 10git-guiFix pending
Fix deferred
Red Hat Enterprise Linux 10git-instawebFix pending
Fix deferred
Red Hat Enterprise Linux 10git-subtreeFix pending
Fix deferred
Red Hat Enterprise Linux 10git-svnFix pending
Fix deferred
Red Hat Enterprise Linux 10gitkFix pending
Fix deferred
Red Hat Enterprise Linux 10gitwebFix pending
Fix deferred
Red Hat Enterprise Linux 10perl-GitFix pending
Fix deferred
Red Hat Enterprise Linux 10perl-Git-SVNFix pending
Fix deferred
Red Hat Enterprise Linux 9gitFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-allFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-coreFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-core-docFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-credential-libsecretFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-daemonFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-emailFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-guiFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-instawebFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-subtreeFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9git-svnFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9gitkFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9gitwebFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9perl-GitFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 9perl-Git-SVNFixed0:2.43.5-1.el9_4RHSA-2024:4083
Red Hat Enterprise Linux 8gitFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-allFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-coreFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-core-docFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-credential-libsecretFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-daemonFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-emailFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-guiFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-instawebFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-subtreeFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8git-svnFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8gitkFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8gitwebFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8perl-GitFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 8perl-Git-SVNFixed0:2.43.5-1.el8_10RHSA-2024:4084
Red Hat Enterprise Linux 7emacs-gitWill not fix
Out of support scope
Red Hat Enterprise Linux 7emacs-git-elWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-allWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-bzrWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-cvsWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-daemonWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-emailWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-gnome-keyringWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-guiWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-hgWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-instawebWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-p4Will not fix
Out of support scope
Red Hat Enterprise Linux 7git-svnWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitkWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitwebWill not fix
Out of support scope
Red Hat Enterprise Linux 7perl-GitWill not fix
Out of support scope
Red Hat Enterprise Linux 7perl-Git-SVNWill not fix
Out of support scope
Red Hat Enterprise Linux 6emacs-gitWill not fix
Out of support scope
Red Hat Enterprise Linux 6emacs-git-elWill not fix
Out of support scope
Red Hat Enterprise Linux 6gitWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-allWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-cvsWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-daemonWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-emailWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-guiWill not fix
Out of support scope
Red Hat Enterprise Linux 6git-svnWill not fix
Out of support scope
Red Hat Enterprise Linux 6gitkWill not fix
Out of support scope
Red Hat Enterprise Linux 6gitwebWill not fix
Out of support scope
Red Hat Enterprise Linux 6perl-GitWill not fix
Out of support scope
AlmaLinux 9gitFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-allFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-coreFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-core-docFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-credential-libsecretFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-daemonFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-emailFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-guiFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-instawebFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-subtreeFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9git-svnFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9gitkFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9gitwebFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9perl-GitFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 9perl-Git-SVNFixed2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux 8gitFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-allFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-coreFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-core-docFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-credential-libsecretFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-daemonFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-emailFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-guiFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-instawebFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-subtreeFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8git-svnFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8gitkFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8gitwebFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8perl-GitFixed2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux 8perl-Git-SVNFixed2.43.5-1.el8_10ALSA-2024:4084
Rocky Linux 9gitFixed0:2.43.5-1.el9_4RLSA-2024:4083
Rocky Linux 8gitFixed0:2.43.5-1.el8_10RLSA-2024:4084
Alpine Linux 3.24gitFixed2.45.1-r0ALPINE-CVE-2024-32021
Alpine Linux 3.23gitFixed2.45.1-r0ALPINE-CVE-2024-32021
Alpine Linux 3.22gitFixed2.45.1-r0ALPINE-CVE-2024-32021
Alpine Linux 3.21gitFixed2.45.1-r0ALPINE-CVE-2024-32021
Alpine Linux 3.20gitFixed2.45.1-r0ALPINE-CVE-2024-32021
Alpine Linux 3.19gitFixed2.43.4-r0ALPINE-CVE-2024-32021
Alpine Linux 3.18gitFixed2.40.3-r0ALPINE-CVE-2024-32021
Alpine Linux 3.17gitFixed2.39.5-r0ALPINE-CVE-2024-32021

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.