CVE-2024-32002 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution
- Published
- Updated
- Exploit status
- No public exploit known
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 products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/git(Debian:12) | < 1:2.39.5-0+deb12u1 | 1:2.39.5-0+deb12u1 |
| debian/git(Debian:12) | = 1:2.39.2+next.20230215-1 | No fix listed |
| debian/git(Debian:12) | = 1:2.39.2-1.1 | No fix listed |
| debian/git(Debian:13) | < 1:2.45.1-1 | 1:2.45.1-1 |
| debian/git(Debian:14) | < 1:2.45.1-1 | 1:2.45.1-1 |
| ubuntu/git(Ubuntu:22.04) | < 1:2.34.1-1ubuntu1.11 | 1:2.34.1-1ubuntu1.11 |
| git | = = 2.45.0 | No fix listed |
| git | = = 2.44.0 | No fix listed |
| git | = >= 2.43.0, < 2.43.4 | No fix listed |
| git | = >= 2.42.0, < 2.42.2 | No fix listed |
| git | = = 2.41.0 | No fix listed |
| git | = >= 2.40.0, < 2.40.2 | No fix listed |
| git | = < 2.39.4 | No fix listed |
| git | = 2.45.0 | No fix listed |
| git | = 2.44.0 | No fix listed |
| git | >= 2.43, < 2.43.4 | 2.43.4 |
| git | >= 2.42.0, < 2.42.2 | 2.42.2 |
| git | = 2.41.0 | No fix listed |
| git | >= 2.40.0, < 2.40.2 | 2.40.2 |
| git | < 2.39.4 | 2.39.4 |
| alpine/git(Alpine:v3.17) | >= 2.40.0, < 2.39.5-r0 | 2.39.5-r0 |
| alpine/git(Alpine:v3.18) | >= 2.40.0, < 2.40.3-r0 | 2.40.3-r0 |
| alpine/git(Alpine:v3.19) | >= 2.40.0, < 2.43.4-r0 | 2.43.4-r0 |
| alpine/git(Alpine:v3.20) | >= 2.40.0, < 2.45.1-r0 | 2.45.1-r0 |
| alpine/git(Alpine:v3.21) | >= 2.40.0, < 2.45.1-r0 | 2.45.1-r0 |
Show 5 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/git(Alpine:v3.22) | >= 2.40.0, < 2.45.1-r0 | 2.45.1-r0 |
| alpine/git(Alpine:v3.23) | >= 2.40.0, < 2.45.1-r0 | 2.45.1-r0 |
| alpine/git(Alpine:v3.24) | >= 2.40.0, < 2.45.1-r0 | 2.45.1-r0 |
| ubuntu/git(Ubuntu:24.04) | < 1:2.43.0-1ubuntu7.1 | 1:2.43.0-1ubuntu7.1 |
| git | >= 2.43.0, < 2.43.4 | 2.43.4 |
References
- Debian Security Tracker CVE-2024-32002 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-6793-1 vendor-advisory
- USN-6793-2 vendor-advisory
- USN-7023-1 vendor-advisory
- www.cve.org
- https://github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgv third-party-advisory
- https://github.com/git/git/commit/97065761333fd62db1912d81b489db938d8c991d patch
- https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---recurse-submodulesltpathspecgt not-applicable
- https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks not-applicable
- lists.fedoraproject.org
- www.openwall.com
- lists.debian.org
- lists.debian.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking