CVE-2024-32021Local Git clone may hardlink arbitrary user-readable files into the new repository's…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | git | Fixed | 1:2.43.0-1ubuntu7.1 | UBUNTU-CVE-2024-32021 |
| Ubuntu 22.04 | git | Fixed | 1:2.34.1-1ubuntu1.11 | UBUNTU-CVE-2024-32021 |
| Ubuntu 20.04 | git | Fixed | 1:2.25.1-1ubuntu3.12 | UBUNTU-CVE-2024-32021 |
| Ubuntu 18.04 | git | Fix pending | 1:2.17.1-1ubuntu0.18+esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-32021 |
| Debian 14 | git | Fixed | 1:2.45.1-1 | DEBIAN-CVE-2024-32021 |
| Debian 13 | git | Fixed | 1:2.45.1-1 | DEBIAN-CVE-2024-32021 |
| Debian 12 | git | Fixed | 1:2.39.5-0+deb12u1 | DEBIAN-CVE-2024-32021 |
| Red Hat Enterprise Linux 10 | git | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-all | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-core | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-core-doc | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-credential-libsecret | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-daemon | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-email | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-gui | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-instaweb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-subtree | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | git-svn | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | gitk | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | gitweb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | perl-Git | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | perl-Git-SVN | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | git | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-all | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-core | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-core-doc | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-credential-libsecret | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-daemon | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-email | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-gui | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-instaweb | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-subtree | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | git-svn | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | gitk | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | gitweb | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | perl-Git | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 9 | perl-Git-SVN | Fixed | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
| Red Hat Enterprise Linux 8 | git | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-all | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-core | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-core-doc | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-credential-libsecret | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-daemon | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-email | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-gui | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-instaweb | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-subtree | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | git-svn | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | gitk | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | gitweb | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | perl-Git | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 8 | perl-Git-SVN | Fixed | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| Red Hat Enterprise Linux 7 | emacs-git | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | emacs-git-el | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-all | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-bzr | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-cvs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-daemon | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-email | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-gnome-keyring | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-gui | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-hg | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-instaweb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-p4 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | git-svn | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | gitk | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | gitweb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | perl-Git | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | perl-Git-SVN | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | emacs-git | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | emacs-git-el | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-all | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-cvs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-daemon | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-email | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-gui | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | git-svn | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | gitk | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | gitweb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | perl-Git | Will not fix Out of support scope | ||
| AlmaLinux 9 | git | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-all | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-core | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-core-doc | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-credential-libsecret | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-daemon | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-email | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-gui | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-instaweb | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-subtree | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | git-svn | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | gitk | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | gitweb | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | perl-Git | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 9 | perl-Git-SVN | Fixed | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux 8 | git | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-all | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-core | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-core-doc | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-credential-libsecret | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-daemon | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-email | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-gui | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-instaweb | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-subtree | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | git-svn | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | gitk | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | gitweb | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | perl-Git | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux 8 | perl-Git-SVN | Fixed | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| Rocky Linux 9 | git | Fixed | 0:2.43.5-1.el9_4 | RLSA-2024:4083 |
| Rocky Linux 8 | git | Fixed | 0:2.43.5-1.el8_10 | RLSA-2024:4084 |
| Alpine Linux 3.24 | git | Fixed | 2.45.1-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.23 | git | Fixed | 2.45.1-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.22 | git | Fixed | 2.45.1-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.21 | git | Fixed | 2.45.1-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.20 | git | Fixed | 2.45.1-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.19 | git | Fixed | 2.43.4-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.18 | git | Fixed | 2.40.3-r0 | ALPINE-CVE-2024-32021 |
| Alpine Linux 3.17 | git | Fixed | 2.39.5-r0 | ALPINE-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.
- git: affected: = 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
References
- https://github.com/git/git/security/advisories/GHSA-mvxm-9j2h-qjx7
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S4CK4IYTXEOBZTEM5K3T6LWOIZ3S44AR/
- http://www.openwall.com/lists/oss-security/2024/05/14/2
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
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.