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.
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
| 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-32002 |
| Alpine:v3.21 | git | 2.45.1-r0 | ALPINE-CVE-2024-32002 |
| Alpine:v3.22 | git | 2.45.1-r0 | ALPINE-CVE-2024-32002 |
| Alpine:v3.23 | git | 2.45.1-r0 | ALPINE-CVE-2024-32002 |
| Alpine:v3.24 | git | 2.45.1-r0 | ALPINE-CVE-2024-32002 |
| Debian:12 | git | 1:2.39.5-0+deb12u1 | DEBIAN-CVE-2024-32002 |
| Debian:12 | git | 1:2.39.5-0+deb12u1 | DSA-5769-1 |
| Debian:13 | git | 1:2.45.1-1 | DEBIAN-CVE-2024-32002 |
| Debian:14 | git | 1:2.45.1-1 | DEBIAN-CVE-2024-32002 |
| 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-32002 |
| 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-32002 |
Affected products (as reported)
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
- https://github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgv x_refsource_CONFIRM
- https://github.com/git/git/commit/97065761333fd62db1912d81b489db938d8c991d x_refsource_MISC
- https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---recurse-submodulesltpathspecgt x_refsource_MISC
- https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks 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
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html