CVE-2026-52726 Details
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.
A vulnerability in Dulwich, a pure-Python implementation of Git file formats and protocols, allows for arbitrary code execution by exploiting the submodule update mechanism. This issue affects Dulwich versions 0.23.2 through 1.2.4. The vulnerability arises because `dulwich.porcelain.submodule_update` and `porcelain.clone(..., recurse_submodules=True)` do not validate submodule paths from upstream repositories. An attacker can craft a `.gitmodules` file and a corresponding tree gitlink that points to `.git/hooks` or another directory within the `.git` directory of the parent repository. When this malicious submodule is processed, its contents are written directly into the victim's `.git/hooks` directory, retaining executable permissions. Any executables placed in this directory are subsequently executed by Git or Dulwich commands that trigger the corresponding hook, leading to arbitrary code execution.
Users are advised to upgrade to Dulwich version 1.2.5, which includes a patch for this vulnerability by validating submodule paths to prevent exploitation.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 10, 2026CISA-ADP
Assessed Jun 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/jelmer/dulwich/security/advisories/GHSA-gfhv-vqv2-4544 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5 | [email protected] | Release NotesVendor |
| https://github.com/jelmer/dulwich/security/advisories/GHSA-gfhv-vqv2-4544 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| dulwich | >= 0.23.2, < 1.2.5 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 21, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 11, 2026 | CVE Modified | CISA-ADP |
| Jun 10, 2026 | New CVE Received | [email protected] |
Volerion