Improper Link Resolution Before File Access ('Link Following')
CVE-2024-32002
Summary
Git is a revision control system. In versions prior to 2.39.4, 2.40.x prior to 2.40.2, 2.41.x prior to 2.41.1, 2.42.x prior to 2.42.2, 2.43.x prior to 2.43.4, 2.44.x prior to 2.44.1, and 2.45.x prior to 2.45.1, 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. 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.
- HIGH
- NETWORK
- HIGH
- CHANGED
- NONE
- NONE
- HIGH
- HIGH
CWE-59 - Improper Link Resolution Before File Access
'Improper link resolution before file access' occurs when software accesses a file resource but fails to verify that the file isn't a link or shortcut to another file. An attacker can potentially gain access to arbitrary files and from there the impact can vary, depending on the application, from sensitive data exposure to remote code execution.
References
Advisory Timeline
- Published