Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious repo with crafted .gitmodules
-
DeliveryVictim runs dulwich recursive clone
-
ExploitSubmodule tree written to .git/hooks/ with +x
-
ExecutionVictim runs follow-on git/dulwich command
-
PersistHook executes attacker payload
-
ImpactArbitrary code execution as victim user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The victim must perform a recursive submodule operation against an attacker-controlled repository - specifically a call to dulwich.porcelain.clone(..., recurse_submodules=True) or a direct call to dulwich.porcelain.submodule_update - using dulwich version 0.23.2 through 1.2.4. The malicious upstream must ship a .gitmodules whose submodule path resolves inside the parent repository's .git directory (the description gives '.git/hooks' as the canonical case) plus a matching gitlink tree containing an executable matching a real hook name. Code execution is not instantaneous: it triggers only when a subsequent git or dulwich command invokes the planted hook, so a follow-on operation (status, checkout, commit) on the cloned tree is required. Limiting factors: the victim must opt into recursive submodules (default in some wrappers, opt-in in others), and the attack does not affect users who clone via the native git binary because git's own fixes for CVE-2024-32002/32004 already block this path. |
| Impact | The NVD CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5) materially understates real-world risk: the description explicitly states arbitrary code execution, which implies C:H/I:H/A:H, and exploitation realistically requires the victim to clone an attacker-controlled repository (UI:R) - so both the impact metrics and the UI metric in the published vector appear inconsistent with the described behaviour. There is no EPSS, KEV, or SSVC data in the provided intelligence, and no public PoC is referenced beyond the credited reporter (tonghuaroot), so this should be treated as no public exploit identified at time of analysis. Despite the scoring oddity, the bug class is well-trodden (direct port of Git's 2024 submodule RCE chain) and any pipeline that performs recursive clones of untrusted repositories - CI runners, package mirrors, code-search indexers - should treat this as a high priority. |
| Exploit ScenarioDerived | An attacker publishes a malicious repository (e.g. on a public forge, or as a transitive dependency referenced by a legitimate-looking project) whose .gitmodules declares a submodule with path '.git/hooks' and whose tree contains an executable named 'post-checkout' or 'pre-commit'. When a CI job, developer, or automated indexer invokes dulwich.porcelain.clone(url, recurse_submodules=True), the submodule's contents are written into the cloned repo's .git/hooks/ directory with executable bits intact, and the very next dulwich or git operation against that working copy fires the hook, executing the attacker's payload as the user running the tooling. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 10, 2026
Arbitrary code execution in Dulwich (pure-Python Git implementation) versions 0.23.2 through 1.2.4 allows a malicious upstream repository to drop executable files into a victim's .git/hooks/ directory during a recursive clone or submodule update. When the victim subsequently runs any git or dulwich command that invokes the planted hook, the attacker's code executes with the victim's privileges. No public exploit identified at time of analysis, though the technique mirrors the well-documented upstream Git flaws CVE-2024-32002 and CVE-2024-32004.
RemediationAI
Vendor-released patch: dulwich 1.2.5 (https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5) - upgrade immediately, which is the primary remediation as it adds submodule path validation rejecting entries that resolve inside .git or above the work tree. If an immediate upgrade is not possible, avoid calling porcelain.clone with recurse_submodules=True and avoid porcelain.submodule_update against any repository whose .gitmodules content is not fully trusted; the trade-off is that submodules must then be initialized manually or via the system git binary (which already carries the CVE-2024-32002/32004 fixes). For CI/build systems that ingest third-party repositories, route recursive submodule operations through native git instead of dulwich until the upgrade is rolled out, and audit existing checkout caches for unexpected files in .git/hooks/ as a compromise indicator. Also review the bundled fixes in 1.2.5 for CVE-2026-42305, CVE-2026-42563, and CVE-2026-47712, which apply to the same release.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Dulwich is a pure-Python reimplementation of Git's file formats and wire protocols, used by tools like Bazaar, GitPython alternatives, and various build/CI systems that prefer avoiding a native git dependency (CPE cpe:2.3:a:jelmer:dulwich). The flaw (CWE-22, Path Traversal) lives in dulwich.porcelain.submodule_update, which materializes submodules using the path field from a crafted .gitmodules and the matching tree gitlink without validating that the path stays inside the working tree. Because dulwich reimplemented Git's submodule porcelain independently, the hardening upstream Git added for CVE-2024-32002 / CVE-2024-32004 (rejecting submodule paths that traverse into .git or escape the work tree) was never carried over, so a path of '.git/hooks' is accepted verbatim and the submodule's tree contents - executable bits preserved - are written into the live hooks directory.
Know when Dulwich gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Network-delivered via malicious repo (AV:N), no auth on attacker side (PR:N), but victim must initiate the recursive clone (UI:R); resulting hook execution yields full C/I/A compromise.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 1 pypi packages depend on dulwich (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.23.2.
Articles & Coverage 1
Executive ViewAI
Dulwich versions 0.23.2 through 1.2.4 contain an arbitrary code execution vulnerability triggered when cloning repositories or updating submodules from untrusted sources. Attackers can inject malicious code into git hooks that execute with victim privileges on subsequent git operations, enabling supply chain compromise of development and CI/CD environments. No vendor patch is currently available, requiring immediate operational controls.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict Dulwich clone and submodule operations to trusted internal repositories only; (2) Run Dulwich in isolated sandboxed environments separate from production systems; (3) Disable git hook execution at the application layer if available; (4) Deploy continuous file integrity monitoring on .git/hooks directories; (5) Establish process to test and deploy patches immediately upon vendor release.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
The build_index_from_tree function in index.py in Dulwich before 0.9.9 allows remote attackers to execute arbitrary code
Dulwich before 0.18.5, when an SSH subprocess is used, allows remote attackers to execute arbitrary commands via an ssh
Arbitrary file write in Dulwich before 1.2.9 on Windows can be escalated to remote code execution when an unauthenticate
Buffer overflow in the C implementation of the apply_delta function in _pack.c in Dulwich before 0.9.9 allows remote att
Path-restricted checkout in Dulwich 0.24.0 through 1.2.7 follows symlinks when writing restored files, so a crafted repo
Arbitrary file write leading to potential code execution affects Dulwich 0.22.5 through 1.2.7 when a victim pops a stash
Symlink-based path traversal in Dulwich 0.23.1 through 1.2.7 allows an attacker who controls a repository's commit histo
Dulwich before 1.2.9 can be driven into an infinite recursion loop by a crafted packfile containing an OFS_DELTA object
Same weakness CWE-22 – Path Traversal
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 12 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Module for Public Cloud 12 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Not-Affected |
| SUSE Manager Proxy 4.3 | Not-Affected |
| SUSE Manager Proxy LTS 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server LTS 4.3 | Not-Affected |
| SUSE Manager Server 4.3 | Not-Affected |
| SUSE Manager Server LTS 4.3 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 12 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP3 | Not-Affected |
| SUSE Linux Enterprise Server 12 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP3 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-36195
GHSA-gfhv-vqv2-4544
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB