Git Patches Flaw That Lets Malicious Repositories Execute Code During Recursive Clones
AI-summarised brief · reviewed before publication
Git has patched a critical vulnerability (CVE‑2026‑111760) that allowed malicious repositories to execute code on systems performing recursive clones with submodules. The flaw stemmed from an integer truncation in Git’s index handling; an excessively long path could bypass safety checks, be shortened to “.git”, and replace a submodule’s .git file with a symlink to attacker‑controlled hooks. When Git later accessed the submodule, the malicious hooks ran automatically. The issue was addressed in Git 2.56.1 and back‑ported to 2.50.2 through 2.55.1, which now reject overly long paths before truncation. GitHub applied the fixes across its services, including GitHub.com, Enterprise Cloud, and upcoming updates for Desktop, Copilot, Codespaces, and Actions. Users are urged to upgrade to patched versions or follow mitigation steps.
💡 Why It Matters
- · A repository can become a silent drop‑point for code execution, turning routine cloning into a supply‑chain attack.
- · Rapid adoption of the fix is vital to protect the billions of developers who rely on Git’s default cloning behavior.