Guide Guides

How to safely clone untrusted Git repositories: submodules, config and CI

On 10 November 2026 the Git maintainers disclosed CVE-2026-111760: a malicious repository can run its own code when cloned with --recurse-submodules. As of 12 November 2026 there is no fixed release. It is the third bug of this kind in two and a half years, so it pays to set up how you clone other people's code to blunt the whole class of attacks - now and after the patch lands.

Kyberkit editorial team · · reading time 5 minutes · For admins and analysts

Guide: How to safely clone untrusted Git repos and submodules

Key points

  • CVE-2026-111760 (CVSS 8.0) affects all Git versions according to the maintainers, and no fixed version exists yet. It is triggered only when cloning an attacker's repository with --recurse-submodules.
  • A plain git clone does not fetch submodules. Clone untrusted repos without --recurse-submodules and leave their submodules alone until a fix ships and you know where they point.
  • Check whether you have submodule.recurse=true set globally and whether CI fetches submodules of untrusted code (actions/checkout with submodules: true or recursive).
  • Inspect untrusted code in a disposable environment with no SSH keys or tokens. Update Git as soon as the fix is out - the previous bug of this type, CVE-2025-48384, ended up in the CISA KEV catalog.

What CVE-2026-111760 is and why it matters

On 10 November 2026 the Git maintainers published advisory GHSA-vp2w-7xxj-jvxr, "Recursive clones are susceptible to Remote Code Execution". An attacker-controlled repository can exploit a bug that makes Git overwrite a submodule's gitfile (the small file that tells Git where the submodule's data lives) with a symbolic link. The link points to a directory containing malicious config or hooks, and Git may then run code of the attacker's choosing.

It is rated CVSS 8.0 (vector AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H) - the victim has to clone the attacker's repository themselves. The advisory lists all versions of Git as affected and none as patched; fixes are still being discussed on the git-security mailing list. As a workaround it recommends not cloning repositories from untrusted sources, and says the maintainers believe the bug can only be triggered with --recurse-submodules.

Who should care: developers who try out other people's projects, security analysts pulling code for analysis and, above all, CI/CD pipelines that clone code automatically while holding secrets.

How CVE-2026-111760 works according to the Git maintainers' advisory1. Attacker prepares a repository with a submodule; 2. Victim runs git clone --recurse-submodules; 3. Git overwrites the submodule gitfile with a symlink; 4. The link points to a directory with malicious config or hooks; 5. Git runs the attacker's code1Attacker prepares a repository witha submodule2Victim runs git clone--recurse-submodules3Git overwrites the submodule gitfilewith a symlink4The link points to a directory withmalicious config or hooks5Git runs the attacker's code
How a malicious repository can run code during a recursive clone (simplified, based on GHSA-vp2w-7xxj-jvxr)

Not the first time: submodules as a recurring entry point

The same area - submodules, symlinks and hooks - has bitten Git twice before:

  • CVE-2024-32002 (published 14 May 2024, CVSS 9.0): a crafted repository with submodules tricked Git into writing files into the .git/ directory instead of the submodule's working tree. An attacker could plant a hook that ran while the clone was still in progress, before the user could inspect the code. Fixed in 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2 and 2.39.4; according to the advisory, disabling symlink support (core.symlinks false) also prevented the attack.
  • CVE-2025-48384 (published 8 July 2025, CVSS 8.0): Git dropped a trailing carriage return when writing config values. A submodule path ending in CR could be checked out to the wrong place and, via a symlink, the submodule's post-checkout hook could run. Fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1 and 2.50.1. CISA added it to the Known Exploited Vulnerabilities (KEV) catalog on 25 August 2025.

For the new bug the advisory does not say whether core.symlinks false helps, so don't rely on it.

Timeline of Git bugs involving submodules14 May 2024: CVE-2024-32002 disclosed and fixed, CVSS 9.0; 8 Jul 2025: CVE-2025-48384 disclosed and fixed, CVSS 8.0; 25 Aug 2025: CVE-2025-48384 added to CISA KEV; 10 Nov 2026: CVE-2026-111760 disclosed, no fix yet14 May 2024CVE-2024-32002 disclosed andfixed, CVSS 9.08 Jul 2025CVE-2025-48384 disclosed andfixed, CVSS 8.025 Aug 2025CVE-2025-48384 added to CISAKEV10 Nov 2026CVE-2026-111760 disclosed, nofix yet
Three Git bugs involving submodules and symlinks (from NVD, CISA and Git advisories)

How to clone an untrusted repository safely

1. Clone without submodules. A default git clone does not initialize submodules - that only happens with --recurse-submodules. Don't use it on untrusted code:

git clone https://example.org/project.git

2. Look at what would be fetched. The .gitmodules file in the repository root lists the submodules the project uses and where they come from. Unknown URLs are a reason for caution. Leave the submodules of untrusted projects uninitialized until a fix is released.

3. Make sure Git isn't recursing for you. According to the documentation, submodule.recurse=true turns on --recurse-submodules by default for checkout, fetch, grep, pull, push, read-tree, reset, restore and switch (not for clone itself). Find out whether it is set and where:

git config --show-origin --get-all submodule.recurse

If it prints true, consider turning it off until the fix ships, or use git -c submodule.recurse=0 … for untrusted repositories.

4. Inspect untrusted code in a disposable environment. Our advice from SOC practice: a virtual machine or container without your SSH keys, tokens or cloud credentials. If code does run, there is nothing to steal. The same goes for analysing malware and suspicious repositories like those in the wfx-loot campaign.

5. Disabling hooks is not enough. You can turn hooks off with core.hooksPath=/dev/null, but the advisory mentions malicious config or hooks. Treat it as an extra layer at most, not a replacement for steps 1-4.

What to check in CI/CD

Pipelines are the most sensitive place: they clone automatically and often have tokens for registries and cloud accounts close at hand (as the ARTEX attacks on exposed secrets showed).

  • GitHub Actions: the actions/checkout action's submodules input defaults to false. Find workflows that set submodules: true or recursive and confirm they don't process code from outside sources.
  • Scripts: search pipeline repositories for --recurse-submodules and git submodule update --init.
  • Secrets: by default actions/checkout stores the token in the local Git config (persist-credentials: true). For jobs that don't need to push, set it to false.
grep -rnE "recurse-submodules|submodules: *(true|recursive)" .github/ ci/ scripts/

(Adjust the directories to your project.)

When the fix is released

  1. Check the version: git --version, and on servers and CI images through the package manager too.
  2. Update everywhere untrusted code gets cloned - workstations, build agents, container images. With CVE-2025-48384, less than two months passed between the fix and the KEV listing.
  3. Keep steps 1-4 in place after patching. Submodule bugs keep coming back.

You can break down the score in our CVSS calculator - paste the vector from the advisory to see why high attack complexity (AC:H) and required user interaction (UI:R) give 8.0 rather than 10.

If you suspect code already ran

If you recursively cloned a repository of unknown origin and see odd behaviour: disconnect the machine from the network, rotate the SSH keys, tokens and passwords reachable from that account (from a different device) and review what it had access to. Organisations can report incidents to their national CERT or cyber security agency - in the US to CISA, in the UK to the NCSC.

Updates

  • 12 Nov 2026: Article published. No fixed Git release for CVE-2026-111760 yet (checked in advisory GHSA-vp2w-7xxj-jvxr).

FAQ

Does CVE-2026-111760 affect a plain git clone?

According to the Git advisory, the bug can only be triggered when --recurse-submodules is used. A plain git clone without that option does not initialize or fetch submodules. The maintainers say they believe this is the case rather than that it is proven for every scenario, so treat untrusted repositories with care either way.

Is there a fixed version of Git yet?

Not as of 12 November 2026. Advisory GHSA-vp2w-7xxj-jvxr lists all versions as affected and none as patched; it says patches are being discussed on the git-security mailing list. We will update this article when fixed releases are out.

Will disabling hooks with core.hooksPath protect me?

Only partly. The advisory says the symlink can point to a directory containing malicious config or hooks, so disabling hooks does not cover the config route. The reliable step is not using --recurse-submodules on untrusted repositories.

We use GitHub Actions. Are we exposed?

The actions/checkout action has its submodules input set to false by default, so it does not fetch submodules on its own. The risk appears when a workflow that handles code from outside sources sets submodules: true or recursive, or when a pipeline script runs git clone --recurse-submodules.

Sources

  1. Git - Security advisory GHSA-vp2w-7xxj-jvxr: Recursive clones are susceptible to Remote Code Execution (CVE-2026-111760, 10 Nov 2026)
  2. Git - Security advisory GHSA-8h77-4q3w-gfgv (CVE-2024-32002)
  3. NVD - CVE-2024-32002
  4. NVD - CVE-2025-48384
  5. CISA - Known Exploited Vulnerabilities Catalog: CVE-2025-48384
  6. Git documentation - git-clone, --recurse-submodules
  7. Git documentation - git-config: submodule.recurse, core.symlinks, core.hooksPath
  8. GitHub - actions/checkout, submodules input

Spotted a mistake? Let us know and we will correct it openly.