Vulnerability · Published May 14, 2024 · Assigned by GitHub_M
CVE-2024-32020Cloning local Git repository by untrusted user allows the untrusted user to modify objects in the cloned repository at will
Low 3.9
In plain English
A low-severity security flaw in git from git. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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, local clones may end up hardlinking files into the target repository's object database when source and target repository reside on the same disk. If the source repository is owned by a different user, then those hardlinked files may be rewritten at any point in time by the untrusted user. Cloning local repositories will cause Git to either copy or hardlink files of the source repository into the target repository. This significantly speeds up such local clones compared to doing a "proper" clone and saves both disk space and compute time. When cloning a repository located on the same disk that is owned by a different user than the current user we also end up creating such hardlinks. These files will continue to be owned and controlled by the potentially-untrusted user and can be rewritten by them at will in the future. 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | git | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-all | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-all | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-core | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-core | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-core-doc | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-core-doc | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-credential-libsecret | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-credential-libsecret | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-daemon | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-daemon | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-email | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-email | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-gui | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-gui | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-instaweb | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-instaweb | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-subtree | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-subtree | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | git-svn | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | git-svn | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | gitk | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | gitk | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | gitweb | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | gitweb | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | perl-Git | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | perl-Git | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| AlmaLinux:8 | perl-Git-SVN | 2.43.5-1.el8_10 | ALSA-2024:4084 |
| AlmaLinux:9 | perl-Git-SVN | 2.43.5-1.el9_4 | ALSA-2024:4083 |
| Alpine:v3.20 | git | 2.45.1-r0 | ALPINE-CVE-2024-32020 |
| Alpine:v3.21 | git | 2.45.1-r0 | ALPINE-CVE-2024-32020 |
| Alpine:v3.22 | git | 2.45.1-r0 | ALPINE-CVE-2024-32020 |
| Alpine:v3.23 | git | 2.45.1-r0 | ALPINE-CVE-2024-32020 |
| Alpine:v3.24 | git | 2.45.1-r0 | ALPINE-CVE-2024-32020 |
| Debian:12 | git | 1:2.39.5-0+deb12u1 | DEBIAN-CVE-2024-32020 |
| Debian:12 | git | 1:2.39.5-0+deb12u1 | DSA-5769-1 |
| Debian:13 | git | 1:2.45.1-1 | DEBIAN-CVE-2024-32020 |
| Debian:14 | git | 1:2.45.1-1 | DEBIAN-CVE-2024-32020 |
| Rocky Linux:8 | git | 0:2.43.5-1.el8_10 | RLSA-2024:4084 |
| Rocky Linux:9 | git | 0:2.43.5-1.el9_4 | RLSA-2024:4083 |
| Ubuntu:22.04:LTS | git | 1:2.34.1-1ubuntu1.11 | USN-6793-1 |
| Ubuntu:22.04:LTS | git | 1:2.34.1-1ubuntu1.11 | UBUNTU-CVE-2024-32020 |
| Ubuntu:24.04:LTS | git | 1:2.43.0-1ubuntu7.1 | USN-6793-1 |
| Ubuntu:24.04:LTS | git | 1:2.43.0-1ubuntu7.1 | UBUNTU-CVE-2024-32020 |
Affected products (as reported)
Weakness: CWE-281 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:L
References
- https://github.com/git/git/security/advisories/GHSA-5rfh-556j-fhgj x_refsource_CONFIRM
- https://github.com/git/git/commit/1204e1a824c34071019fe106348eaa6d88f9528d x_refsource_MISC
- https://github.com/git/git/commit/9e65df5eab274bf74c7b570107aacd1303a1e703 x_refsource_MISC
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S4CK4IYTXEOBZTEM5K3T6LWOIZ3S44AR/
- http://www.openwall.com/lists/oss-security/2024/05/14/2