CVE-2026-52726: Jelmer Dulwich arbitrary code execution via submodule path traversal

CVE-2026-52726 · Severity: high · CVSS 7.5 · Published 2026-06-10

Dulwich, a Python implementation of the Git file format and protocols, is vulnerable to a path traversal flaw when handling submodules. An attacker can provide a specially crafted repository that, when cloned or updated with submodules enabled, writes malicious executable files into the internal Git configuration directory of the victim's machine. This can lead to full system compromise (Remote Code Execution) when the victim subsequently performs standard Git operations.

Technologies: dulwich (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-52726 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-52726 being exploited in the wild.
How severe is CVE-2026-52726?
High severity, with a CVSS score of 7.5, published 10 June 2026.
Which products and versions are affected?
dulwich (PyPI) >= 0.23.2, < 1.2.5, ECOSYSTEM:introduced=0.23.2,fixed=1.2.5.
Is there a fix for CVE-2026-52726?
Yes. dulwich (PyPI): upgrade to 1.2.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-52726 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-52726?
Check whether you run dulwich (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • dulwich (PyPI): upgrade to 1.2.5 or later
    pip install "dulwich>=1.2.5"

Technical details

A path traversal vulnerability exists in `dulwich.porcelain.submodule_update` and `porcelain.clone(recurse_submodules=True)`. The root cause is a lack of validation for the `path` attribute in `.gitmodules` and tree gitlink entries. An attacker can specify a path such as `.git/hooks`, causing Dulwich to materialize the submodule's contents into the parent repository's internal hooks directory while preserving executable bits. When the victim or a Dulwich-based service later triggers a Git hook (e.g., post-checkout, pre-commit), the attacker's payload is executed. This is the Dulwich-specific equivalent of CVE-2024-32002 and CVE-2024-32004. The issue is fixed in version 1.2.5.

Affected products

  • jelmer dulwich >= 0.23.2, < 1.2.5

Identifiers

  • CVE-2026-52726
  • GHSA-gfhv-vqv2-4544
  • PYSEC-2026-2465

Timeline

  • 2026-05-28: disclosed
  • 2026-07-02: advisory
  • 1.2.5: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.