Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. dulwich
  4. ›
  5. CVE-2026-52726

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

July 2, 2026

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.

References

  • github.com/advisories/GHSA-gfhv-vqv2-4544
  • github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5
  • github.com/jelmer/dulwich/security/advisories/GHSA-gfhv-vqv2-4544
  • nvd.nist.gov/vuln/detail/CVE-2026-52726

Code Behaviors & Features

Detect and mitigate CVE-2026-52726 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.23.2 before 1.2.5

Fixed versions

  • 1.2.5

Solution

Upgrade to version 1.2.5 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/dulwich/CVE-2026-52726.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 11 Jul 2026 12:17:44 +0000.