CVE-2026-52726 Dulwich's submodule path traversal in porcelain.submodule_update / porcelain.clone(recurse_submodules=True) yields RCE via attacker-dropped .git/hooks payload
Attackers can achieve remote code execution by crafting a repository with malicious submodule paths that write executable hooks into the victim's .git directory.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-52726?
CVE-2026-52726 is a high-severity path traversal vulnerability in jelmer dulwich, published on 10 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Dulwich is a pure-Python implementation of the Git file formats and protocols. Starting in version 0.23.2 and prior to version 1.2.5, `dulwich.porcelain.submodule_update`, and by extension `porcelain.clone(..., recurse_submodules=True)`, materializes attacker-controlled submodule paths from a crafted upstream repository without path validation. A malicious `.gitmodules` plus a matching tree gitlink whose `path` is `.git/hooks` (or any other directory inside the parent repository's `.git` directory) causes the attacker's submodule tree contents to be written directly into the victim's `.git/hooks/` directory, preserving executable mode bits. The dropped executables are then run by any subsequent `git` or `dulwich` command that invokes the matching hook, resulting in arbitrary code execution. This is the dulwich equivalent of the upstream Git fixes for CVE-2024-32002 / CVE-2024-32004, which were never propagated into dulwich's separately implemented submodule porcelain. Version 1.2.5 patches the issue.
Weakness: CWE-22
Which versions are affected by CVE-2026-52726?
3 open source packages ship an affected version, including dulwich.
| Package | Affected | Fixed in |
|---|---|---|
dulwich PyPI | From 0.23.2 | 1.2.5 |
dulwich PyPI | From 0.23.2 | 1.2.5 |
dulwich PyPI | From 0.23.2 | 1.2.5 |
How do I fix CVE-2026-52726?
Upgrade dulwich to 1.2.5 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-52726 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-52726 exists.
Sources
Also known as CLEANSTART-2026-XF61795, CLSA-2026-1783299701, DEBIAN-CVE-2026-52726, ECHO-fc0e-ca5a-02ac, GHSA-gfhv-vqv2-4544, MINI-ppgj-42ph-g88g and 3 more.