A flaw in Git can let a malicious repository run an attacker's code on a computer that clones it recursively, together with its submodules. The Git project fixed it this week in Git 2.56.1, with matching fixes for the 2.50 through 2.55 series in 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1.
The flaw, tracked as CVE-2026-111760, is an integer truncation in how Git handles its index. An extremely long path in a repository can pass Git's safety check, but Git then writes it to disk under a shorter name that an attacker can set to .git.
This lets an attacker replace a submodule's .git file with a symbolic link to a folder holding malicious hooks or configuration. Hooks are programs Git runs at set points, so once Git uses that folder, the attacker's code can run.
Submodules matter here because Git refuses to replace a .git folder with a symbolic link, but in a freshly cloned submodule, .git is a file.
The fixed versions, listed in the Git project's release announcement, refuse such extremely long paths before their length can be cut short.
GitHub, which ships Git in its own tools, explained the fixes in a detailed write-up. It advises installing a fixed version from your operating system or Git distributor, and updating any app that ships its own copy of Git.
com and GitHub Enterprise Cloud. 4.
Source link







