Don't Clone That Repo Yet: Git 2.56.1 Fixes a Recursive-Clone Code Execution Flaw — Six Flaws in One Release
On 10 November 2026 the Git project shipped 2.56.1, fixing six security flaws. The worst, CVE-2026-111760, lets a crafted repository run attacker code during a recursive clone. Upgrade first; trust comes second.

In short: run one clone, and code runs — only it is the attacker's code
On 10 November 2026, the Git project shipped security release 2.56.1, fixing six security vulnerabilities at once. The worst is CVE-2026-111760: a carefully crafted malicious repository can execute an attacker's code on your machine when you clone it recursively. You do not run any program from the repository, you do not click any suspicious file inside it — one plain git clone --recurse-submodules is enough for the code to run. GitHub staff engineer Elijah Newren spelled this out on the official GitHub Blog, and the fix shipped with 2.56.1 alongside backports to six maintenance releases: 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3 and 2.50.2. GitHub's security advisory rates the flaw High, with a CVSS 3.1 score of 8.0.
For people who write code every day, the shock is not how deep the technical detail goes, but how ordinary the triggering action is. Cloning is the most habitual move a developer makes, more automatic than opening an editor. You see an interesting repository, you clone it and try it out; you help someone reproduce a problem, you pull the repository down first; you ask an AI assistant to look at a project, and its first step is to clone it. In vibe coding workflows, cloning happens even more often than in traditional development: people clone by hand, agents clone in bulk, and CI pipelines clone fully automatically. A "read-only operation" turning out to be code execution means the most familiar road developers walk every day has just been marked as a road you must check before passing. This article covers three things: how the flaw is actually triggered, what the other five flaws fixed in the same release are, and what you should upgrade tonight — plus how to hold the line until you do.
How the flaw is triggered: a swap where the name does not match
The conclusion first, then the detail. The conclusion: Git miscalculates the length of an extremely long path while handling a repository's index, so a path that should have been blocked passes the check, and lands on disk under a different, shorter name. The attacker uses this mismatch — one name at check time, another at write time — to replace a submodule's .git file with a symbolic link pointing at an attacker-controlled directory. Git then reads the configuration and hooks from that directory, and the attacker's code runs during the recursive clone.
Here is the detail. Before writing files into a working tree, Git checks their paths, and one rule is that paths must not overwrite its own repository metadata — the contents of the .git directory. The problem is an integer truncation in index handling: an extremely long path passes validation because its length gets truncated, so it is checked under the long name; when it is actually written, the truncated, shorter name is used. The attacker calculates the length difference precisely so that the name on disk ends up being exactly .git, replacing the submodule's .git file with a symbolic link to a directory holding malicious configuration and hooks. Git then uses that directory as normal, and the hooks execute. The Hacker News added a key detail: Git normally refuses to replace a .git directory with a symbolic link, but in a freshly cloned submodule, .git is a file, not a directory, so that protection does not apply. The flaw was reported by Robert Chen and fixed by Elijah Newren and Toon Claes, with help from Johannes Schindelin and Jeff King. The fix is direct: reject extremely long index entry paths before their lengths can be truncated.
Is a non-recursive clone safe, then? Not entirely. The GitHub Blog describes a second variant: in an ordinary clone without submodules, an attacker can replace the top-level .git directory with a file pointing at attacker-controlled repository metadata. The clone may then report an error and recommend running git status in the resulting directory — and following that advice can execute attacker-controlled code. This detail matters, because it shows the danger is not confined to the --recurse-submodules switch; it sits in the habit of "doing the next thing the tool suggests". On the other hand, GitHub's security advisory states the trigger conditions: it is currently believed the flaw can only be triggered when the --recurse-submodules option is used, and the attacker's repository is hosted on a server the attacker controls, not an ordinary repository on a normal code hosting site. In other words, a random public repository will not suddenly turn into a trap; a trap has to be deliberately built and then put in front of you.
The release also adds a layer of hardening on the side: overflow checks on related index entry allocations during checkout and tree processing, to stop allocation sizes from being truncated or overflowing before a path is copied into memory. That is the "fix one, and block the same class next door" approach, and it shows the Git maintainers treated this as a class of problem, not a single hole.
The release itself is also worth a look: six flaws in one package, seven versions shipped at the same time. Git's maintenance lines run long, from 2.50 to 2.56 across many major versions, and each line needs its own backported fix, which means the same patch must be verified separately on seven lines. This "fix once, fix everywhere" shape is exactly the normal state of security work on foundational tools: users are spread across versions, so the project cannot just patch the newest release and stop. For users, that is actually good news: you do not have to jump to the newest major version for safety — patching the maintenance line you are already on is enough. The catch is that you have to know which line you are on and what its fixed version is. Many people cannot even say which major version they have installed, which makes it easy to upgrade the wrong thing.
Not just cloning: the other five flaws fixed in the same release
Many people will only remember the recursive clone flaw, but 2.56.1 fixed six, and the other five each have their own trigger. They are worth going through one by one, because together they make a point: Git's attack surface is not only the clone step — merging, patching and importing data carry risks too.
CVE-2026-113408 is a path traversal at the protocol layer. When cloning an empty repository over Git protocol v2, the server can advertise a HEAD symbolic reference pointing at an "unborn" branch, one with no commits yet, and Git did not validate the target of that reference before storing it locally. A malicious server can put path-traversal components in the name, and a later operation that updates the branch can write outside the intended reference directory. It was reported by Luke Martin and fixed by Toon Claes; the fix validates the advertised target before accepting it, and the release also validates other reference names and symbolic-reference targets received over protocol v2.
CVE-2026-114467 is stack corruption while stripping signatures. When removing GPG signatures from a message, Git assumed there would be at most two signatures and used a fixed-size stack array. A crafted message containing more than two signatures can write past the end of that array. It can be triggered by merging a tag containing more than two signatures, causing memory corruption and a potential denial of service, and hosting services that perform these merges on behalf of users are affected too. The fix removes the fixed-size array and handles messages with any number of signatures. It was reported by pwn2addr and fixed by Karthik Nayak.
CVE-2026-114469 is an out-of-bounds read when applying binary patches. Git rejects patches larger than approximately 1 GiB because its patch application code cannot safely handle larger inputs — but that check only considered the size of the patch as supplied. Binary patches are compressed and encoded, so a relatively small patch can expand beyond that limit. A crafted patch can bypass the input-size check and cause an out-of-bounds read, crashing Git. The fix also checks the declared uncompressed size before processing a binary patch. Again reported by pwn2addr and fixed by Karthik Nayak.
CVE-2026-105437 is heap corruption during large merges. Git's merge machinery calculates how much memory it needs for a merge result before writing the output, and that calculation can overflow when the result is very large — including when many conflicts are combined with a large conflict-marker-size attribute. The overflow can cause Git to allocate a buffer that is too small and then write outside it, corrupting heap memory. This affects applications and hosting services that use Git to merge untrusted content, as well as local merges. The fix uses size-appropriate types and checked arithmetic, rejecting merges whose output size cannot be represented safely. The fix was implemented by Kaartic Sivaraam based on a patch by Jeff King, with help from Toon Claes and Christian Couder. The Hacker News also mentions a workaround: set conflict-marker-size=7 in info/attributes.
CVE-2026-114466 is filesystem access through fast-import streams. git fast-import reads a stream of commands to build a repository. Some commands can access files outside the repository, so Git already restricts them when they appear in an untrusted input stream — but three features lacked that protection. The rewrite-submodules-from and rewrite-submodules-to features can read arbitrary files, potentially exposing their contents through error messages, and the export-pack-edges option can create files or append data to existing files. These features are now rejected when supplied through the input stream unless the caller explicitly enables --allow-unsafe-features, an option that should only be used when you trust the program generating the stream. Again reported by pwn2addr and fixed by Karthik Nayak.
What 8.0 means, and what it does not mean
GitHub's security advisory rates CVE-2026-111760 High, with a CVSS 3.1 score of 8.0 and the vector network-reachable, high attack complexity, low privileges required, user interaction required, changed scope, and high impact on confidentiality, integrity and availability. The score needs to be read correctly: it describes how serious the flaw is once its conditions are met, not that it "goes off at a touch". High attack complexity and user interaction required already state the precondition — somebody has to actively clone the malicious repository, with --recurse-submodules. If nobody clones it, the flaw just sits there and never triggers.
It is equally important to state that, as of 10 November, there is no known exploitation in the wild. The flaw is not in the US CISA Known Exploited Vulnerabilities catalog, and no public proof-of-concept exploit has been recorded. The coverage agrees: no attacks have been reported. This is a patch that needs immediate action, not an intrusion already under way. But the window is real: the details are public, the fix is written down in plain sight, and the time from disclosure to a working exploit is usually just a matter of time. An editor's note on the GitHub Blog, dated 17 November, adds another fact: the advisory was updated a week after publication with additional CVE information and updated guidance for GitHub Enterprise Server users, which shows the vendor itself is still following up on how these fixes land.
There is also a coincidence of timing worth noting: in the same week, on 18 November, NGINX disclosed two HTTP/2 remote code execution flaws. Within one month, Git and NGINX — two pieces of infrastructure developers use every day — both disclosed serious problems. That is not an attempt to tie two events into one conspiracy; it is a judgement: the foundational tools of everyday development are being examined closely, and the old assumption that "the tool itself is trustworthy by default" is being taken back, one place at a time. No matter how clean your application code is, a hole in the toolchain in front of it can take down the whole stack.
Who needs to upgrade now, and what exactly
The most direct action is to upgrade Git itself. The fixed version is 2.56.1, and if you are on an older maintenance line, the matching fixes are 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3 and 2.50.2. GitHub says the fixes have been deployed across github.com, GitHub Enterprise Cloud, and GitHub Enterprise Cloud with data residency. For GitHub Enterprise Server, the fixes are in versions 3.19.16, 3.20.12, 3.21.10 and 3.22.5, which carry GitHub-maintained builds of Git, so the bundled Git version numbers differ from the upstream versions listed above — administrators should upgrade by the Enterprise Server version number. These are the figures after the 17 November update; the original 10 November reporting listed 3.19.15, 3.20.11, 3.21.9 and 3.22.4, so use the updated advisory.
Upgrading only the Git on your command line is not enough — the list this time is longer than most people expect. GitHub is coordinating releases of GitHub Desktop and the GitHub Copilot app that include patched versions of Git, and GitHub Codespaces and GitHub Actions will also receive patched versions. In other words, the Git on your machine, the Git embedded in your editor, the Git in your CI runners and the Git inside your container images all need checking separately. Many developers do not actually know how many copies of Git they have: one installed by the system, one bundled with the editor, another inside Docker images — upgrading only the system copy is like locking one door. The check is simple: run git --version first, then think about where else in your toolchain another copy of Git is hiding.
Windows users need to pay extra attention. When The Hacker News checked at 19:09 UTC on 10 November, Git for Windows had not yet released a version based on 2.56.1: the v2.56.1.windows.1 tag existed, but no published release with installer assets had appeared. That meant Windows developers were, at that moment, in the position of knowing a patch existed but not yet being able to install it — they need to watch the Git for Windows release feed rather than assume they are covered. If you are reading this a few days later, check whether your distribution has caught up before deciding whether to lean on the workarounds in the next section.
If you cannot upgrade yet, hold the line like this
The GitHub Blog's interim advice is practical, in three parts. First, clone only from trusted servers, and leave untrusted repositories alone — recursive clones most of all. Second, do not merge untrusted content or tags, and do not process binary patches or fast-import streams from untrusted sources. Third, none of this replaces the fix; updating is the real answer. Blunt, but the meaning is clear: workarounds stop you from walking into the trap yourself, while the patch removes the trap itself. One cannot substitute for the other.
For an individual developer, those three points translate into daily habits: look at an unfamiliar repository before cloning it; do not reflexively add --recurse-submodules to a link somebody just dropped in chat; and apply the same check to repositories your AI assistant suggests cloning. The third habit is the easiest to miss: many people now have an agent read repositories, reproduce issues and run open-source projects, which means the clone step has moved from human hands to agent hands. Whether your agent is recursively cloning unfamiliar repositories with nobody watching is worth checking in its tool-call history and default behaviour. A clone that looks read-only can happen dozens of times a day in an agent's hands, and each one is a vote of trust.
For teams and CI, the real target may not be personal machines at all, but the pipeline. CI runners automatically clone large numbers of public repositories every day, some of them from links submitted by outside contributors, often with recursive cloning. An attacker does not need to persuade any individual to clone by hand — getting the pipeline to clone is enough. The GitHub Blog specifically reminds administrators to update the Git installations used by automation and services that process repositories on behalf of users. That sentence is aimed squarely at CI. If you own a pipeline, tonight's checklist is: which Git version your runners use, whether the pipeline recursively clones untrusted repositories, and whether builds triggered by pull requests touch external links.
Judgement: the most dangerous thing is not "running code", but "thinking you did not run code"
The thing most worth remembering from this incident is not any single CVE number, but a correction to an assumption: cloning is not a read-only operation. Developers carry an unwritten dividing line in their heads: running code is dangerous, looking at code is safe. Downloading, cloning, opening a file — all of these are filed by default on the safe side. CVE-2026-111760 breaks exactly that line: you think you are just "pulling the code down to look at it", while Git is already executing something somebody else wrote for you. Once that line breaks, every daily habit has to be re-examined: which operations are genuinely just reading, and which ones look like reading but are already executing something behind the scenes.
This matters most in the vibe coding era. AI programming workflows are built on cloning that is frequent, fast and automatic: clone to find a reference implementation, clone to reproduce someone else's project, ask an agent to compare ten repositories and you have ten clones behind the scenes. The more frequent the action, the higher the chance of hitting a trap — while human vigilance falls as frequency rises. Worse, an agent does not hesitate before cloning the way a person does: given the instruction "look at this repository", it executes directly, with no pause to ask whether the link is trustworthy. Protection therefore has to work on two levels: upgrade the tools so the trap itself stops working, and put a gate on the agent's cloning behaviour — for example, only allowing it to clone from an allow-list of sources, or at least turning off recursive cloning by default.
Finally, the plainest point: this fix is deeply boring — just a version number bump, no new feature, no new interface, nothing worth posting about. But that is the normal state of security work: the actions that matter most often look the most boring. A week after Git 2.56.1 shipped, the vendor was still updating the advisory and adding Enterprise Server guidance, which shows even the vendor believes "shipped" is not the same as "fixed" — upgrading, verifying and confirming still sit in between. Whether you did your upgrade, whether the runners' Git was replaced, whether the Windows packages caught up — there are no shortcuts for those questions, only checking them one by one. The vulnerability window will not wait for you, and patches do not install themselves.
Comments (0)
Sources
Related articles
On 17 November 2026, Microsoft launched MAI Code 2 and Code 2 Flash: the larger model has 77 billion active parameters and a one-million-token context, averaging 63.2% across four benchmarks — close to GPT-6.1 Sol and Claude Opus 5.5 — at $0.309 per task. Read the three caveats first: promotional pricing, the lowest score of the three, and no long-horizon work.
On 11 November 2026, AWS open-sourced UAEF: adapters turn traces from LangGraph, LangChain, Strands and Bedrock AgentCore into one format, then 36 metrics across 7 dimensions score them, flagging regressions past 5%. The judge model is hardened too — scores must cite verbatim evidence, and never decide safety.
On 17 November 2026, Perplexity launched the Orchestrator API: one interface reaching OpenAI, Anthropic, Google, xAI and open-weight models such as GLM, Kimi and DeepSeek, billed at the answering model's published rate with no platform fee. When one provider fails, the same model retries on another deployment, and preview routing assigns requests to models by task.