RC RANDOM CHAOS

Git Vulnerability Enables Code Execution via Malicious Submodules

· via The Hacker News

Original source

Git Patches Flaw That Lets Malicious Repositories Execute Code During Recursive Clones

The Hacker News →

A critical vulnerability in Git’s path handling (CVE-2026-111760) enables attackers to execute code on systems that recursively clone repositories with malicious submodules. The flaw stems from an integer truncation bug: file paths longer than Git’s safety checks allow can be truncated when written to disk. By crafting the path carefully, attackers can make the truncated version become .git, effectively replacing a submodule’s configuration file with a symbolic link to a directory containing malicious hooks.

The Git project released fixes this week in version 2.56.1 and backported them to versions 2.50 through 2.55. The patches reject excessively long paths before truncation occurs. Concurrent releases addressed five additional vulnerabilities: path traversal in clones of empty repositories, stack corruption from tags with multiple GPG signatures, binary patches bypassing size limits, heap corruption during large merges with conflict markers, and uncontrolled file operations through fast-import features. GitHub has already deployed patches across its services, with updates pending for desktop and copilot clients.

Until patches are available, users should avoid recursively cloning untrusted repositories, restrict cloning to trusted servers, and refrain from merging untrusted content or binary patches. Hosting services that automatically run merge checks should prioritize patching, as the merge-related vulnerability affects infrastructure.

Read the full article

Continue reading at The Hacker News →

This is an AI-generated summary. Read the original for the full story.