What happened (in plain English)

Git just got a wake-up call. A bug could let a malicious repository sneak code onto your machine when you clone it recursively — that is, when you pull a repo and its submodules in one go. The core fix shipped in Git 2.56.1, with backported patches for the 2.50–2.55 lines.

In short: a subtle integer truncation in how Git checks path lengths meant an extra-long file path could pass the safety test, but then get chopped when written to disk. An attacker could craft the shortened name to become .git in a freshly cloned submodule and replace that file with a symbolic link pointing at a folder full of malicious hooks or settings. Since Git runs certain hooks automatically, that gave the attacker a way to get code executed on the machine doing the clone.

Submodules matter because a submodule’s .git starts life as a file (not a folder), and Git treats files and folders differently when it comes to symbolic links — which is exactly what the attacker abuses.

What to do (and other things you should know)

First, don’t panic — but do act. The safest route is to update Git to a patched version as soon as you can. The project released 2.56.1 and also provided fixes for 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1 and 2.55.1. Hosting providers and apps that bundle Git have been rolling out updates as well.

If you can’t update right away, treat any recursive clone or submodule operation with suspicion. Here are practical short-term steps:

  • Only clone from servers and projects you trust.
  • Avoid recursive clones of repos you don’t trust.
  • Don’t merge unfamiliar content or tags without review.
  • Don’t accept binary patches or fast-import streams from untrusted sources.

The release also fixes several other vulnerabilities — quick, non-technical summaries below so you know what else changed:

  • CVE-2026-113408: A malicious server can send a branch name containing path traversal when cloning an empty repo over Git protocol v2, potentially causing writes outside Git’s reference area.
  • CVE-2026-114467: Merging a tag with more than two GPG signatures can corrupt memory and crash Git; services that auto-merge on behalf of users might be affected.
  • CVE-2026-114469: A crafted binary patch that expands enormously can bypass Git’s ~1 GiB patch-size check and lead to an out-of-bounds read.
  • CVE-2026-105437: Very large merges combined with a large conflict-marker-size attribute can overflow a buffer and corrupt heap memory.
  • CVE-2026-114466: Certain fast-import features could be abused to read or create files; they’re now rejected by default unless the unsafe flag is explicitly set.

Platform notes: major code hosts have been applying fixes to their services and enterprise offerings. Desktop and app vendors that bundle Git are rolling out patched builds — check your distro or vendor for an update. Some builds, like certain Windows distributions, may lag behind the upstream release for a short time.

If you manage a server and can’t upgrade immediately, there are workarounds for specific issues: for the large-merge/marker-size problem, servers can set conflict-marker-size=7 in each repo’s info/attributes or disable the merge-tree checks for untrusted repos until they can apply the patch.

Bottom line: treat recursive cloning with a little extra skepticism, patch Git when you can, and nag your team to do the same. Your future self (and your terminal) will thank you.