Vulnerability in Dulwich Git Implementation Allows Arbitrary Code Execution
CVE-2026-52726
What is CVE-2026-52726?
Dulwich, a Python-based Git implementation, suffers from a vulnerability that allows attackers to execute arbitrary code by manipulating submodule paths from a malicious upstream repository. When an attacker crafts a .gitmodules file and includes a gitlink pointing to the directory .git/hooks, their submodule's contents can be materialized directly into the victim's .git/hooks/ directory without proper validation checks. This results in executable files being dropped and potentially executed by subsequent git or dulwich commands that trigger the matching hook. This flaw mirrors issues resolved in upstream Git versions, which were not implemented in Dulwich's separate submodule feature. The vulnerability has been addressed in version 1.2.5.
Affected Version(s)
dulwich >= 0.23.2, < 1.2.5
