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 w

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-05-18 23:30:04

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.

Leave a Comment