Vulnerability · Published May 14, 2024 · Assigned by GitHub_M

CVE-2024-32002Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution

Critical 9.1

In plain English

A critical-severity path traversal in git from git. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 29.2% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.1Critical
Exploit odds (30 days)29.2%top 1.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

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, repositories with submodules can be crafted in a way that exploits a bug in Git whereby it can be fooled into writing files not into the submodule's worktree but into a `.git/` directory. This allows writing a hook that will be executed while the clone operation is still running, giving the user no opportunity to inspect the code that is being executed. 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. If symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. As always, it is best to avoid cloning repositories from untrusted sources.

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-32002
Alpine:v3.21git2.45.1-r0ALPINE-CVE-2024-32002
Alpine:v3.22git2.45.1-r0ALPINE-CVE-2024-32002
Alpine:v3.23git2.45.1-r0ALPINE-CVE-2024-32002
Alpine:v3.24git2.45.1-r0ALPINE-CVE-2024-32002
Debian:12git1:2.39.5-0+deb12u1DEBIAN-CVE-2024-32002
Debian:12git1:2.39.5-0+deb12u1DSA-5769-1
Debian:13git1:2.45.1-1DEBIAN-CVE-2024-32002
Debian:14git1:2.45.1-1DEBIAN-CVE-2024-32002
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-32002
Ubuntu:24.04:LTSgit1:2.43.0-1ubuntu7.1USN-6793-1
Ubuntu:24.04:LTSgit1:2.43.0-1ubuntu7.1UBUNTU-CVE-2024-32002

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-22, CWE-434 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

References