Git

Git CVE-2026-111760: Check and Patch the Recursive Clone RCE

A recursive clone of the wrong repository can run someone else’s code with your user’s rights. CVE-2026-111760 is an integer truncation in Git’s index handling. An extremely long path passes Git’s safety checks under one name and is written under a shorter one, so a crafted repository can swap a submodule’s .git file for a symlink to a directory full of hostile config and hooks. Those hooks then run during git clone --recurse-submodules.

Original content from computingforgeeks.com - post 191686

The Git project fixed it on 10 November 2026 in 2.56.1 and six maintenance releases. Debian, Ubuntu and the RHEL family had not shipped a package yet when we wrote this, so the work for most teams is a version check, a patched Git from outside the distro, and tighter clone habits on CI runners. We tested all of it in November 2026 on Ubuntu 26.04 and 24.04, Debian 13, Rocky Linux 10 and Amazon Linux 2023, and the sandboxed clone in the mitigation section ran under the calling user’s own UID inside the container.

Fixed Git versions and distro status

You are protected when your Git is at or above the fixed release for its maintenance series, or when your vendor’s package carries a backport. Upstream released these on 10 November 2026, announced on the GitHub blog together with advisory GHSA-vp2w-7xxj-jvxr:

Your Git seriesFixed release
2.56.x2.56.1
2.55.x2.55.1
2.54.x2.54.1
2.53.x2.53.1
2.52.x2.52.1
2.51.x2.51.3
2.50.x2.50.2
2.49 and olderno upstream backport, move to a fixed series or a vendor package
Git for Windows2.56.1.windows.1 (10 November 2026)

Distro packages lag behind that list. We checked each tracker on 17 November 2026. Fedora rebased to 2.56.1 and Amazon backported the fix, while Debian, Ubuntu and Red Hat have shipped nothing yet:

DistributionShipped gitStatus for CVE-2026-111760
Amazon Linux 20232.50.1-1.amzn2023.0.2Fixed by ALAS2023-2026-3445 (12 November, Important)
Fedora 43, 44 and 452.56.1-1.fc43, fc44, fc45Fixed in stable updates (12 to 14 November), sudo dnf upgrade git
Debian 13 trixie1:2.47.3-0+deb13u1Vulnerable, no fix (tracker, bug 1153670)
Debian 12 bookworm1:2.39.5-0+deb12u3Vulnerable, no fix
Debian forky and sid1:2.53.0-1 and 1:2.55.0-1Vulnerable, unfixed in unstable
Ubuntu 26.10, 26.04, 24.04, 22.04, 20.04, 18.04, 16.0426.04 ships 1:2.53.0-1ubuntu1.1, 24.04 ships 1:2.43.0-1ubuntu7.4Needs evaluation, priority Medium (Ubuntu CVE page)
RHEL 6, 7, 8, 9 and 10git from each release’s AppStream or base repoAffected, Important, no fix available, workaround only (Red Hat VEX)
Rocky Linux 10, AlmaLinux 10git-2.52.0-1.el10No advisory yet, they follow RHEL

The Red Hat VEX file also lists Red Hat Hardened Images, OpenShift AI, OpenShift Container Platform 4 and 5, OpenShift Dev Spaces and Satellite 6 as affected. If you run those, the advice below about runners and clone habits applies to them as well.

Severity, exploitation and the five sibling fixes

Scores differ by source. NVD published the record on 16 November (UTC) and shows the GitHub CNA score of 8.0 with vector CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H; NVD’s own assessment is not out yet. Red Hat rates it 8.8 Important with CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Both need a user or a pipeline to clone the attacker’s repository recursively, so the exposure sits where untrusted URLs get cloned.

We checked exploitation status on 17 November 2026. The CVE is not in CISA’s Known Exploited Vulnerabilities catalog (catalog version 2026.11.13, 1,781 entries, read from the cisagov/kev-data mirror). FIRST’s EPSS API returns no score for it yet, and none of the vendors or The Hacker News report exploitation in the wild. The advisory describes the hostile repository as hosted by the attacker rather than on a normal forge, and its authors believe only --recurse-submodules (or its alias --recursive) triggers it.

The same releases close five more bugs. They matter for forges and merge bots more than for laptops, and every fixed version in the table covers all six:

  • CVE-2026-113408: a server can advertise an unborn HEAD with path traversal over protocol v2, and the files ref backend writes to unintended files.
  • CVE-2026-114467: stripping more than two GPG signatures from a commit message corrupts the stack, reachable through git merge of a crafted tag.
  • CVE-2026-114469: a binary patch that inflates past the roughly 1 GiB limit slips through the size check and crashes Git with an out-of-bounds read.
  • CVE-2026-105437: large merges with a large conflict-marker-size overflow the result buffer and corrupt the heap.
  • CVE-2026-114466: the fast-import features rewrite-submodules-from, rewrite-submodules-to and export-pack-edges could read arbitrary paths and are now disallowed by default.

If your platform team runs a self-hosted forge, patch it as well as the runners. GitHub Enterprise Server has the fixes in 3.19.15, 3.20.11, 3.21.9 and 3.22.4, and our GitLab CVE-2026-110264 patch guide covers the version check pattern for GitLab hosts.

The version check on each host

git --version alone does not answer the question, because the fixed release depends on the series you run. This short script maps your series to its fix and compares the two with sort -V. Open a new file in your home directory:

vim ~/git-cve-check.sh

Paste the following. The cut trims Git for Windows strings such as 2.56.1.windows.1 to three fields, and anything older than 2.50 falls through to the oldest fixed series:

v=$(git --version | awk '{print $3}' | cut -d. -f1-3)
case "${v%.*}" in
  2.56) f=2.56.1 ;; 2.55) f=2.55.1 ;; 2.54) f=2.54.1 ;; 2.53) f=2.53.1 ;;
  2.52) f=2.52.1 ;; 2.51) f=2.51.3 ;; 2.50) f=2.50.2 ;; *) f=2.50.2 ;;
esac
if [ "$(printf '%s\n' "$f" "$v" | sort -V | head -1)" = "$f" ]; then
  echo "git $v: at or above $f, upstream fix included"
else
  echo "git $v: below $f, check your distro changelog for CVE-2026-111760"
fi

Run it, then ask the package manager whether the vendor patched the build without changing the version. On Debian and Ubuntu the changelog sits at /usr/share/doc/git/changelog.Debian.gz; on RPM systems rpm -q --changelog prints it:

bash ~/git-cve-check.sh
apt-cache policy git
zgrep -c CVE-2026-111760 /usr/share/doc/git/changelog.Debian.gz

Our Ubuntu 26.04 runner came back with git 2.53.0, one point release short of 2.53.1, and a changelog count of 0. The policy output shows the package came from the normal resolute-updates and resolute-security pockets, so nothing newer is waiting there:

Ubuntu 26.04 runner reporting git 2.53.0 below the 2.53.1 fix for CVE-2026-111760 with no CVE entry in the package changelog

Ubuntu 24.04 ran 2.43.0 and Debian 13 ran 2.47.3. Both are older than any fixed series, and both changelogs counted 0. On Rocky Linux 10, AlmaLinux 10 and RHEL, check the RPM changelog and the advisory metadata together:

rpm -q git
rpm -q --changelog git | grep -c CVE-2026-111760
sudo dnf -q updateinfo list --cve CVE-2026-111760

Rocky Linux 10 reported git-2.52.0-1.el10, a changelog count of 0 and an empty updateinfo list. An empty list means no advisory exists for this CVE yet. It does not mean the package is safe:

Rocky Linux 10 with git 2.52.0 and no dnf advisory for CVE-2026-111760

Read a “below” verdict from the script as “check the vendor”, never as “vulnerable” on its own. Amazon Linux 2023 is the case in point: its fixed package still prints 2.50.1 and the script flags it, while the changelog shows the backport. If you are rusty on the grep, awk and sort flags the script leans on, the Linux commands cheat sheet for files, grep, find and processes keeps them on one page.

Patched Git on Ubuntu from the git-core PPA

The Ubuntu Git Maintainers’ PPA (ppa:git-core/ppa) published 1:2.56.1-0ppa1 for 26.10, 26.04, 24.04 and 22.04 on 11 November 2026, which makes it the fastest fix for Ubuntu hosts while the archive status reads “Needs evaluation”. Add it and upgrade Git in place:

sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get install -y git

On the 24.04 runner apt fetched git amd64 1:2.56.1-0ppa1~ubuntu24.04.1 (7,786 kB) and unpacked it over 1:2.43.0-1ubuntu7.4. The PPA builds the newest upstream release only, so this jumps a 24.04 host across thirteen minor versions. Run your pipeline’s Git-heavy jobs once on a single runner before you roll it across the fleet.

Ubuntu 26.04 keeps the old git after adding the PPA

On our Ubuntu 26.04 cloud image the same two commands changed nothing: the candidate stayed at 1:2.53.0-1ubuntu1.1. That image ships /etc/apt/apt.conf.d/90arch-variant with APT::Architecture-Variants "amd64v3";, so apt prefers the archive’s amd64v3 builds, and the PPA’s amd64v3 index carries no git binary. If your machine has that file, pin the PPA source to plain amd64:

cat /etc/apt/apt.conf.d/90arch-variant
sudo sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/git-core-ubuntu-ppa-resolute.sources
sudo apt-get update -qq
apt-cache policy git | head -3

The sed adds one Architectures: amd64 line under Components: in the deb822 source file that add-apt-repository wrote. After the refresh, the candidate moved to the PPA build:

Ubuntu 26.04 amd64v3 architecture variant hiding the git-core PPA build until Architectures amd64 is added

Run sudo apt-get install -y git again and apt pulls 1:2.56.1-0ppa1~ubuntu26.04.1. Hosts upgraded in place from 24.04 may not have the variant file at all, and our Ubuntu 24.04 to 26.04 upgrade notes cover what else changes on that path.

Proof the PPA build is the one in use

Rerun the check and confirm the installed version came from ppa.launchpadcontent.net:

git --version
bash ~/git-cve-check.sh
apt-cache policy git | head -8

The 24.04 runner now reports 2.56.1, and the asterisk in the version table sits on the PPA line. The 26.04 runner showed the same result with the resolute/main amd64 index:

Ubuntu 24.04 runner on git 2.56.1 from the git-core PPA after patching CVE-2026-111760

Leave the PPA enabled until Ubuntu ships its own fix. Removing the PPA alone keeps 1:2.56.1-0ppa1 installed, because Ubuntu’s own fix will carry a lower version number and apt never downgrades on its own. Once a USN appears, install the helper with sudo apt-get install -y ppa-purge, and sudo ppa-purge ppa:git-core/ppa then removes the source and moves Git back to the archive build in one step.

A source build for Debian and RHEL-family hosts

Debian has no fixed package in any suite, and Red Hat has published a workaround but no package. On those hosts a source build of 2.56.1 into /usr/local closes the hole without touching the distro package, which keeps apt and dnf free to deliver the official fix later. Install the build dependencies first. On Debian 13 and 12:

sudo apt-get install -y build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext zlib1g-dev cargo

On Rocky Linux 10, AlmaLinux 10 and RHEL 10 the same set has RPM names, and cargo comes from AppStream:

sudo dnf -y install gcc make openssl-devel libcurl-devel expat-devel gettext zlib-devel perl-ExtUtils-MakeMaker cargo

Download the release tarball from kernel.org and check it against the published SHA-256 before you build it. The version is pinned on purpose, because this guide targets the release that carries the fix:

GIT_VER="2.56.1" # pin: first release with the CVE-2026-111760 fix #https://github.com/git/git/tags
mkdir -p ~/src && cd ~/src
curl -fLO "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VER}.tar.xz"
curl -fsSL https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc | grep "git-${GIT_VER}.tar.xz"
sha256sum "git-${GIT_VER}.tar.xz"

Both lines must show f0b0bf89264b9bd2e1c640363e7529643989da76281600473c50745cd34a607f. If they differ, stop and download again from another mirror. Do not build a tarball that fails this check. Because the sums file comes from the same mirror, this catches a corrupt download rather than a tampered one; teams that need the stronger proof verify the signed sha256sums.asc with the Git maintainer’s GPG key. Then unpack it and build as your normal user:

tar -xf "git-${GIT_VER}.tar.xz"
cd "git-${GIT_VER}"
make -j"$(nproc)" prefix=/usr/local all

The build took 35 seconds on a 4 vCPU Debian 13 VM, and the Rocky Linux 10 VM of the same size took noticeably longer. One line in the log is new for anyone who built Git a year ago: CARGO target/release/libgitcore.a. Git 2.56 compiles its Rust code by default.

Build error “cargo: not found”

Our first Debian build ran without the cargo package and stopped at the Rust library:

Git 2.56.1 source build failing with cargo not found on Debian 13

Install cargo (Debian 13 ships 1.85.1) and run make again. The Makefile also accepts NO_RUST=1, which drops the Rust subsystems for now, but its own comment says Rust becomes mandatory with Git 3.0, so installing cargo is the better habit. Do not run sudo make install until the build finishes as your user: a root-run install over a failed build leaves root-owned files in the tree, and the next build fails on .depend permission errors.

Install to /usr/local and prove which git runs

Install with the same prefix, then clear the shell’s command cache so the new binary wins:

sudo make prefix=/usr/local install
hash -r
which -a git
git --version
/usr/bin/git --version

On Debian 13 the shell now resolves /usr/local/bin/git at 2.56.1. The distro binary at /usr/bin/git is still 2.47.3 and still vulnerable, which is the part people miss:

Debian 13 running a source-built git 2.56.1 from /usr/local/bin while /usr/bin/git stays at 2.47.3

Rocky Linux 10 gave the same picture: /usr/local/bin/git at 2.56.1 ahead of the git-2.52.0-1.el10 RPM. Our Git install guide for RHEL, Rocky and AlmaLinux covers the packaged route once Red Hat ships a fix:

Rocky Linux 10 with source-built git 2.56.1 ahead of the vulnerable git-2.52.0 RPM

The old binary matters because PATH is per process. A systemd unit, a cron job or a CI runner service that sets its own PATH, or calls /usr/bin/git by name, keeps cloning with the vulnerable build. Check the environment of each runner service with systemctl show -p Environment -p EnvironmentFiles <unit>, and read any environment file it lists. Where you cannot change it, keep the mitigation below in place for that service until the vendor package lands.

The Amazon Linux 2023 advisory

Amazon Linux 2023 is the one platform in this guide with a backported fix that keeps the old version string. ALAS2023-2026-3445, rated Important, backports all six CVEs into git-2.50.1-1.amzn2023.0.2 and its subpackages. AL2023 locks its repositories to the release the AMI was built from by default, so an instance launched from an older AMI shows an empty advisory list unless you name the fixed release. Do not read that empty list as “nothing to patch”. List the advisory against release 2023.12.20261112, then apply only that advisory:

rpm -q git
sudo dnf updateinfo list --cve CVE-2026-111760 --releasever 2023.12.20261112
sudo dnf -y update --advisory ALAS2023-2026-3445 --releasever 2023.12.20261112

We ran this in an amazonlinux:2023 container (release 2023.12.20261112) as root, after installing the previous 2.50.1-1.amzn2023.0.1 build. That image was already on the fixed release, so our capture shows the commands without --releasever. The update moved git, git-core, git-core-doc and perl-Git to .0.2, and the RPM changelog names the backport:

Amazon Linux 2023 applying ALAS2023-2026-3445 to move git to 2.50.1-1.amzn2023.0.2 with the CVE-2026-111760 backport

git --version still prints 2.50.1 after the update, so the version check script reports “below 2.50.2” on a patched AL2023 host. Trust the RPM release suffix and the changelog line there. To move the whole instance to the newer release rather than just Git, sudo dnf check-release-update lists the available releases first.

Recursive clones on runners you cannot patch yet

Every host you cannot patch this week needs its clone habits changed instead. Red Hat’s workaround names three controls, and they line up with upstream’s advice. Each one should hold on an unpatched runner:

  • No job clones an untrusted repository with --recurse-submodules or --recursive.
  • Untrusted repositories are cloned plain, and .gitmodules is read before any submodule is fetched.
  • Clones of untrusted URLs run in an unprivileged container or sandbox.

Start with the first control, because it is the one the advisory ties the bug to. Find where your automation asks for recursion:

cd ~/pipelines && grep -rnE 'recurse-submodules|--recursive|submodules: *(true|recursive)|GIT_SUBMODULE_STRATEGY: *recursive' .

Our lab kept its sample pipelines in ~/pipelines; run the same grep from the root of each CI and config repository you own. If your YAML quotes the value, as in GIT_SUBMODULE_STRATEGY: "recursive", change the last alternative to *"?recursive. In our sample tree the pattern caught all three forms we planted: submodules: recursive on actions/checkout in a GitHub Actions workflow, GIT_SUBMODULE_STRATEGY: recursive in GitLab CI, and a plain git clone --recurse-submodules in a shell script:

grep finding recursive submodule checkouts in GitHub Actions, GitLab CI and a shell script

Each hit is a decision, not an automatic fix. A first-party repository whose submodules point at your own forge is low risk. A job that clones whatever URL a user, a webhook or a dependency file names is the exposure this CVE describes. For GitLab runners, GIT_SUBMODULE_STRATEGY: normal initialises only top-level submodules, but it still fetches them with no review, so it only helps when those .gitmodules URLs are first-party. Our GitLab Runner setup guide shows where runner-wide settings live.

A plain clone, then the submodules you approve

Clone without recursion, read the submodule URLs, and only then fetch the submodules you recognise. The commands below use the public git/git repository, which has one submodule:

git clone --depth 1 https://github.com/git/git.git git-src
cd git-src
git config -f .gitmodules --get-regexp '\.url$'
git submodule status
git submodule update --init --depth 1

The .gitmodules query listed one URL, https://github.com/cr-marcstevens/sha1collisiondetection.git, and git submodule status printed it with a leading minus because it was not initialised yet. Only after we accepted that URL did the update fetch it. With one submodule a bare update --init is fine; in a repository with several, it fetches every one of them, so name the approved paths instead: git submodule update --init --depth 1 -- sha1collisiondetection.

Non-recursive clone with .gitmodules URLs inspected before git submodule update

This two-step flow cuts out the recursive clone the advisory names. It is a review gate, not a guarantee, because an unpatched Git still processes the hostile repository’s index. Upstream says outright that these precautions do not replace the update.

Clones inside an unprivileged container

When a job must clone untrusted URLs, run the clone in a throwaway container with your own UID, every capability dropped and no privilege escalation. Hooks that fire there see only the mounted work directory, though they can still reach the network, so keep secrets out of it. With Docker installed (our Docker CE on Ubuntu 26.04 guide covers it), run:

mkdir -p ~/sandbox
docker run --rm --user "$(id -u):$(id -g)" --cap-drop ALL --security-opt no-new-privileges -e HOME=/tmp -v ~/sandbox:/work -w /work alpine/git clone --depth 1 https://github.com/git/git.git
docker run --rm alpine/git --version

The alpine/git image we pulled carried git 2.54.1, already a fixed release, and the clone landed in ~/sandbox owned by our own UID and GID. Our first attempt hard-coded --user 1000:1000 and failed with fatal: could not create work tree dir 'git': Permission denied, because the lab user was UID 1001. Use id -u rather than guessing:

Clone run in an alpine/git container as an unprivileged user with all capabilities dropped

Pin the image by digest in real pipelines and recheck its git --version against the table, because a floating latest tag can move backwards as easily as forwards. Keep secrets and deploy keys out of that container: a hook that does fire should find nothing worth stealing.

Bundled Git copies outside the package manager

Patching the system package leaves every bundled Git untouched. Git for Windows shipped 2.56.1.windows.1 on 10 November 2026 with all six fixes, so Windows developer machines and Windows runners need that installer. GitHub says GitHub Desktop and the Copilot app will ship patched Git, and that Codespaces and the hosted Actions runners will receive it too, so check their release notes before you treat them as covered. Our post on GitHub Actions ubuntu-latest moving to 26.04 shows how to read the hosted runner’s tool versions.

Container images are the other blind spot. Build images, IDE images and tool images usually install Git once and never upgrade it. Run docker run --rm <image> git --version against each image your pipelines use, and rebuild any that fall below the fixed release for their series.

CI runner audit checklist

Work through this list on every runner and build host. Each item is a condition that should hold once you are done:

  1. Every runner’s git --version is at or above the fixed release for its series, or its package changelog names CVE-2026-111760.
  2. Every runner service resolves the patched binary, and no unit or script calls a vulnerable /usr/bin/git by full path.
  3. Ubuntu hosts with 90arch-variant show the PPA build as installed, not just as a candidate.
  4. Amazon Linux 2023 hosts run git-2.50.1-1.amzn2023.0.2 or later.
  5. No job clones a user-supplied or third-party URL with --recurse-submodules, submodules: recursive or GIT_SUBMODULE_STRATEGY: recursive.
  6. Jobs that must clone untrusted repositories do it in an unprivileged container with no secrets mounted.
  7. Build and tool images report a fixed Git version, and Windows machines run Git for Windows 2.56.1.windows.1 or later.
  8. Someone owns rechecking the Debian, Ubuntu and Red Hat trackers until a vendor package replaces the PPA or /usr/local build.

When the distro package lands, move the host back to it with ppa-purge or by deleting the /usr/local build by hand (Git’s Makefile has no uninstall target, so stage one install with make prefix=/usr/local DESTDIR=/tmp/gitstage install in the source tree, and delete under /usr/local every path it lists, scalar and the Perl modules included), and run the version check one more time so the next audit starts from a single known Git on each machine.

Keep reading

UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 PHP2Shell (CVE-2026-109618, CVE-2026-109619): Check and Patch PHP Php PHP2Shell (CVE-2026-109618, CVE-2026-109619): Check and Patch PHP PHP2Shell on End-of-Life PHP 8.1, 8.0 and 7.4 (WHMCS, ionCube) Php PHP2Shell on End-of-Life PHP 8.1, 8.0 and 7.4 (WHMCS, ionCube) NoisyTCP (CVE-2026-99288): Check, Mitigate, Patch the Kernel Security NoisyTCP (CVE-2026-99288): Check, Mitigate, Patch the Kernel TrueNAS SCALE CVE-2026-123033: Check Your Version and Patch Security TrueNAS SCALE CVE-2026-123033: Check Your Version and Patch Install OpenWrt on Proxmox VE as a VM Router Networking Install OpenWrt on Proxmox VE as a VM Router

Leave a Comment

Press ESC to close