Git Releases Critical Security Updates to Address Six Vulnerabilities

The Git project has issued a series of urgent security patches to address six distinct vulnerabilities that could expose users to arbitrary code execution, memory corruption, and unauthorized file system access. These security flaws, which impact various core components of the version control system—including repository cloning, merge operations, and binary patch processing—have prompted a coordinated response from the Git maintainers. Security teams and individual developers are being urged to update their Git installations immediately to mitigate these risks.

The updates are officially bundled in Git version 2.56.1, with backported fixes provided for several previous maintenance releases, including versions 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3, and 2.50.2. Because Git is a foundational tool integrated into countless development environments, CI/CD pipelines, and hosting platforms, the project maintains that updating the primary binary is not enough; users must also identify and update any third-party applications or development environments that bundle their own instances of Git.

Understanding the Risks: Vulnerabilities in Git

The vulnerabilities identified in this release cycle range from relatively straightforward path-handling errors to complex memory management issues. The most severe of these, tracked as CVE-2026-111760, involves the risk of arbitrary code execution during the cloning of a malicious repository.

Under normal circumstances, Git is designed to carefully validate file paths before writing them into a local working tree. This validation process is critical for preventing an attacker from overwriting sensitive repository metadata, such as the .git directory or configuration files. However, the Git project discovered that an integer truncation error within the index-handling logic allowed exceptionally long paths to pass validation under one name, only to be written to the disk using a shorter, malicious alias.

An attacker-controlled server could exploit this discrepancy to replace a user’s local .git configuration or inject custom hooks. For recursive clones, this vulnerability could trigger the execution of attacker-supplied code immediately upon cloning. For non-recursive clones, the threat is equally concerning: an attacker could replace the top-level .git directory with a file pointing to malicious metadata. If a user subsequently follows prompts—such as running git status in the compromised directory as suggested by the client—they could unwittingly trigger the execution of malicious code. The fix deployed in the latest update works by explicitly rejecting index entry paths that exceed safe length limits before truncation can occur.

Path Traversal and Memory Corruption

Another significant concern involves CVE-2026-113408, which highlights a path-traversal vulnerability occurring when cloning empty repositories via Git protocol v2. In this scenario, a malicious server could advertise a HEAD symref pointing to an unborn branch. Because Git failed to validate the target of the symref before local storage, a malicious actor could supply a name containing path-traversal sequences. This could allow an attacker to write files outside the intended reference directory whenever the branch is updated. The latest release introduces strict validation for these advertised targets, as well as for other reference names and symbolic-reference targets received during protocol v2 communications.

The update also addresses memory-related vulnerabilities that could lead to denial of service or remote code execution. CVE-2026-114467 involves stack corruption during the process of stripping GPG signatures from a message. Git previously relied on a fixed-size stack array, assuming that a message would contain no more than two signatures. A specially crafted message containing more than two signatures could cause Git to write past the bounds of this array, leading to memory corruption. This is particularly relevant for hosting services that automatically process merges on behalf of users. The fix replaces the fixed-size array with a more robust mechanism that can handle an arbitrary number of signatures.

Similarly, CVE-2026-105437 addresses heap corruption during large merge operations. The merge machinery calculates memory requirements before writing output, but this calculation was prone to integer overflow when handling very large result sets or merges with a high number of conflicts combined with a large conflict-marker-size attribute. By utilizing size-appropriate types and implementing checked arithmetic, the Git project has ensured that merges resulting in output sizes that cannot be safely represented are now rejected rather than causing a buffer overflow.

Git security vulnerabilities announced

Patch Processing and File System Security

Binary patch application and fast-import streams were also found to be points of potential failure. CVE-2026-114469 stems from an out-of-bounds read vulnerability when applying binary patches. While Git already enforced a size limit of roughly 1 GiB on patches to prevent unsafe processing, this check only considered the compressed, supplied size. Since binary patches expand upon processing, a carefully crafted patch could bypass the input-size check and crash the application. The updated code now validates the declared uncompressed size of the patch before processing begins.

Furthermore, CVE-2026-114466 concerns unauthorized filesystem access through git fast-import streams. While Git already included protections against commands that access files outside the repository, three specific features—rewrite-submodules-from, rewrite-submodules-to, and export-pack-edges—lacked these safeguards. These could be used to read arbitrary files or create and append data to existing files on the host system. The project has moved to restrict these features, requiring that they be explicitly enabled via a new --allow-unsafe-features flag, which should only be used in trusted environments.

Hardening and Mitigation Strategies

Beyond the specific CVEs, the Git project has implemented additional hardening measures. These include new overflow checks for index entry allocations during tree processing and checkout operations. By preventing allocation sizes from overflowing or truncating before paths are copied into memory, these changes provide a layer of defense-in-depth against potential future exploits that might attempt similar memory manipulation tactics.

For users and administrators, the recommendation is clear: updating to the latest patched version is the most effective defense. While the update process might be disruptive for large-scale infrastructure, the risks posed by these vulnerabilities—particularly those related to code execution during cloning—are significant enough to warrant high-priority attention.

In instances where immediate updates are not feasible, the Git project advises users to exercise extreme caution. This includes cloning only from trusted, verified servers and avoiding the cloning of repositories from untrusted or unknown sources. Furthermore, developers should avoid merging untrusted content or tags and refrain from processing binary patches or fast-import streams that originate from external, unverified sources. However, these operational precautions are not a substitute for the security patches, as they do not address the root causes of the vulnerabilities.

A Collaborative Effort

The resolution of these security flaws is the result of a coordinated effort within the open-source community. The Git project credited several researchers for their discovery and reporting, including Robert Chen, who identified the critical code execution vulnerability, and Luke Martin, who flagged the protocol v2 path-traversal issue. The researcher known as "pwn2addr" was instrumental in reporting multiple vulnerabilities related to memory corruption and filesystem access.

The implementation of the fixes was handled by a core team of maintainers, including Elijah Newren, Toon Claes, Karthik Nayak, and others who contributed patches, reviews, and testing. This collaborative response underscores the ongoing commitment to maintaining the integrity of the Git ecosystem, which serves as the backbone for the vast majority of modern software development. As the industry moves forward, the focus remains on proactive security auditing and the continued hardening of core Git components to withstand increasingly sophisticated attack vectors.

Share:

Lina Irawan writes for Tech Maze.