Git 2.56.1 (CVE-2026-111760): Update Before Your Next Clone

4 min read

Updated November 28, 2026: Git 2.56.1 (CVE-2026-111760) is still the current Git release. GitHub's November 17 update says the GitHub Enterprise Server fixes are in 3.19.16, 3.20.12, 3.21.10 and 3.22.5. The same write-up also says a non-recursive clone can be dangerous if you then follow a prompt to run git status in the folder.

On Tuesday, November 10, the Git project shipped a set of security fixes. The main version is Git 2.56.1, and there are matching fixes for older lines too. Six bugs were fixed in total, and one of them is serious: cloning a bad repository could run someone else's code on your computer.

If you or your team use Git every day (and almost everyone who builds software does), this is a quick update worth doing today.

If you use Vite, there is also a critical dev server bug, GHSA-p4f5-76q4-ffq7, with a simple upgrade.

What happened

The worst bug is tracked as CVE-2026-111760. According to GitHub's write-up, Git checks file paths before writing them, so a repository can't overwrite Git's own files. But a counting bug in how Git handles very long paths let a path pass that check under one name and then get written under a shorter one.

An attacker can use this to swap a submodule's .git file for a link that points to a folder with their own settings or hooks. Hooks are small programs Git runs at certain moments. So once Git uses that folder, the attacker's code can run.

This is most dangerous during a recursive clone, meaning when you clone a repository together with its submodules (for example with --recurse-submodules). The Hacker News explains why submodules matter: Git won't replace a .git folder with a link, but in a freshly cloned submodule, .git is a file, not a folder. GitHub's later update also warns that a non-recursive clone can leave you with a .git file pointing at attacker-controlled metadata; if the clone then errors and suggests running git status, following that advice can run the attacker's code.

The other five bugs are less scary but still worth fixing. They include a bad server writing files outside where it should when you clone an empty repository, crashes and memory problems from huge merges, tags with many signatures or very large binary patches, and some git fast-import options that could read or create files. Those fast-import options are now blocked by default. The full list is in the official release announcement.

Why it matters

Cloning code from strangers is normal now. You try an open source starter, a sample from a tutorial, or a repo someone sent you on a freelance job. Many of those come with submodules. You don't have to do anything unusual to be at risk. One recursive clone of the wrong repository is enough.

It's not just your laptop either. Build servers, CI runners and any tool that clones repositories for you run Git too. GitHub also says to update apps that ship their own copy of Git, since your system update won't fix those.

The good news: GitHub says it has already applied the fixes on github.com and GitHub Enterprise Cloud. If your company runs GitHub Enterprise Server, the fixes are in versions 3.19.16, 3.20.12, 3.21.10 and 3.22.5.

What to do now

  • Check your version by running git --version in a terminal.
  • You're safe if you see 2.56.1, or one of the patched older versions: 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3 or 2.50.2.
  • If not, update Git the way you installed it: through your operating system's updates, Homebrew, your Linux package manager, or the installer from the Git website.
  • Update the Git on your build servers, CI images and Docker images, not just your own machine.
  • Update any desktop apps or tools that come with their own Git built in.
  • If you run GitHub Enterprise Server, upgrade to one of the fixed versions above.

Until you've updated, GitHub suggests some safe habits: only clone from servers you trust, don't recursively clone repositories you don't trust, and don't merge content, tags, binary patches or fast-import streams from sources you don't trust. GitHub is clear that these habits help but don't replace installing the fix.

My take

This is one of those updates that takes five minutes and saves you a very bad day. I'd do it on your own machine first, then add "update Git" to the checklist for your build servers. If you're not sure which Git version your CI or Docker setup uses, it's worth checking this week.

Sources: GitHub Blog, Git 2.56.1 release announcement, The Hacker News.