Git fixes flaw that lets malicious repositories run code during recursive clones

Executive Briefing
“The Git project has released fixes for a flaw that could run an attacker’s code on a...”
Key Takeaways
- 1.CVE-2026-111760 involves integer truncation in Git’s handling of its index. The report says a machine recursively cloning a malicious repository and its submodules could run attacker-controlled code.
- 2.An extremely long path can pass Git’s safety check but be written to disk under a shorter name that the attacker can set to .git. In a newly cloned submodule, .git is a file, which the attacker can replace with a symbolic link to malicious configuration or hooks.
- 3.Hooks are programs Git runs at defined points. If Git uses the folder reached through the symbolic link, a malicious hook can run the attacker’s code.
- 4.The Git project fixed the flaw in 2.56.1 and in versions 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1. The fixes reject excessively long paths before their length can be truncated.
- 5.GitHub recommends installing a fixed Git version through an operating system or distributor and updating applications that bundle Git. Until then, it advises against recursively cloning untrusted repositories, while stressing that this precaution does not replace the fix.
The Git project has released fixes for a flaw that could run an attacker’s code on a machine cloning a malicious repository along with its submodules. The attack exploits how Git handles an excessively long path.
Key Developments and Technical Context
CVE-2026-111760 involves integer truncation in Git’s handling of its index. The report says a machine recursively cloning a malicious repository and its submodules could run attacker-controlled code.
An extremely long path can pass Git’s safety check but be written to disk under a shorter name that the attacker can set to .git. In a newly cloned submodule, .git is a file, which the attacker can replace with a symbolic link to malicious configuration or hooks.
Hooks are programs Git runs at defined points. If Git uses the folder reached through the symbolic link, a malicious hook can run the attacker’s code.
The Git project fixed the flaw in 2.56.1 and in versions 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1. The fixes reject excessively long paths before their length can be truncated.
GitHub recommends installing a fixed Git version through an operating system or distributor and updating applications that bundle Git. Until then, it advises against recursively cloning untrusted repositories, while stressing that this precaution does not replace the fix.
Strategic Analysis and Industry Implications
The risk is not limited to the source files being downloaded. During a recursive clone, Git’s creation and use of a submodule’s .git data can give an untrusted repository a path to code execution.
Avoiding untrusted repositories can reduce immediate exposure, but applications that bundle their own Git still need updates even after the operating system’s Git has been patched.
Outlook and Key Factors to Watch
The supplied excerpts do not say whether the flaw has been exploited in the wild.







