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.

Severity (CVSS 3.1)3.9Low
Exploit odds (30 days)0.5%top 55.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
AlmaLinux:8git2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-all2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-all2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-core2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-core2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-core-doc2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-core-doc2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-credential-libsecret2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-credential-libsecret2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-daemon2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-daemon2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-email2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-email2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-gui2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-gui2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-instaweb2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-instaweb2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-subtree2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-subtree2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8git-svn2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9git-svn2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8gitk2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9gitk2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8gitweb2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9gitweb2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8perl-Git2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9perl-Git2.43.5-1.el9_4ALSA-2024:4083
AlmaLinux:8perl-Git-SVN2.43.5-1.el8_10ALSA-2024:4084
AlmaLinux:9perl-Git-SVN2.43.5-1.el9_4ALSA-2024:4083
Alpine:v3.20git2.45.1-r0ALPINE-CVE-2024-32020
Alpine:v3.21git2.45.1-r0ALPINE-CVE-2024-32020
Alpine:v3.22git2.45.1-r0ALPINE-CVE-2024-32020
Alpine:v3.23git2.45.1-r0ALPINE-CVE-2024-32020
Alpine:v3.24git2.45.1-r0ALPINE-CVE-2024-32020
Debian:12git1:2.39.5-0+deb12u1DEBIAN-CVE-2024-32020
Debian:12git1:2.39.5-0+deb12u1DSA-5769-1
Debian:13git1:2.45.1-1DEBIAN-CVE-2024-32020
Debian:14git1:2.45.1-1DEBIAN-CVE-2024-32020
Rocky Linux:8git0:2.43.5-1.el8_10RLSA-2024:4084
Rocky Linux:9git0:2.43.5-1.el9_4RLSA-2024:4083
Ubuntu:22.04:LTSgit1:2.34.1-1ubuntu1.11USN-6793-1
Ubuntu:22.04:LTSgit1:2.34.1-1ubuntu1.11UBUNTU-CVE-2024-32020
Ubuntu:24.04:LTSgit1:2.43.0-1ubuntu7.1USN-6793-1
Ubuntu:24.04:LTSgit1:2.43.0-1ubuntu7.1UBUNTU-CVE-2024-32020

Affected products (as reported)

VendorProductVersions
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

Weakness: CWE-281 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:L

References