Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim clones attacker-crafted repo
-
DeliveryWorktree symlink planted pointing to .git/hooks/post-checkout
-
ExploitVictim runs checkout(paths=[...]) restoring file from tag
-
Executionos.open follows symlink, writes malicious hook
-
PersistNext checkout executes post-checkout hook
-
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 Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires that the victim (1) obtain and process an attacker-controlled repository containing a worktree entry that is a symlink (mode 120000) resolving to .git/hooks/post-checkout or another sensitive path, and (2) specifically invoke porcelain.checkout(paths=[...]) to selectively restore that path from an attacker-chosen ref/tag that holds the file as a regular/executable blob. Limiting factors: exploitation is local and depends on the victim using the selective paths= checkout API (not merely cloning), on the victim targeting the crafted ref, and on user interaction (UI:P); it does not trigger from a plain clone or default full checkout alone. Affected versions are Dulwich 0.24.0 through 1.2.7; upgrading to 1.2.8 removes the condition. |
| Impact | This is a credible but conditional risk rather than a drop-everything emergency. The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:P) scores 7.3 (High) and correctly captures the key constraints: exploitation is LOCAL (the victim must process a crafted repository on their own machine), requires a present attack condition (AT:P - the victim must invoke the specific checkout(paths=[...]) code path restoring a file from an attacker-controlled ref), and requires passive user interaction (UI:P). PR:N is accurate in the sense that the attacker needs no account or privileges on the victim system - they only need to get the victim to clone and selectively check out a malicious repo. Technical impact is high: arbitrary file write with attacker-controlled permissions leading to RCE via a planted .git/hooks/post-checkout hook. No EPSS score and no KEV listing are present in the input, and there is no public exploit code identified - only a detailed written reproduction in the GHSA advisory. There is no conflict between the signals: all of them point to a serious-but-narrow supply-chain/tooling vulnerability whose exploitation depends on victim workflow (using the paths= selective-checkout API), not on broad remote reachability. Priority should be elevated for environments that run Dulwich-based tooling against untrusted repositories, and moderate elsewhere. Note the attack vector is genuinely local/workflow-dependent despite the 'remote repo' framing - the trigger is the victim's own checkout operation, so AV:L is appropriate. |
| Exploit ScenarioDerived | An attacker publishes a repository whose HEAD contains a worktree entry 'trigger' as a symlink (mode 120000) pointing to ../../.git/hooks/post-checkout, while a tag such as v1.0 holds 'trigger' as an executable blob containing a malicious shell script. When a victim clones the repo and runs porcelain.checkout(paths=["trigger"]) to restore that file from the tag, the raw os.open without O_NOFOLLOW follows the symlink and writes the payload into the git hook, achieving code execution on the next checkout. No public exploit code is identified, but the advisory provides a complete step-by-step reproduction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 21, 2026
Path-restricted checkout in Dulwich 0.24.0 through 1.2.7 follows symlinks when writing restored files, so a crafted repository can redirect a selective checkout into arbitrary filesystem locations - including .git/hooks/post-checkout - to plant an executable hook and achieve code execution. Exploitation is conditional: the victim must obtain an attacker-controlled repository whose worktree entry is a symlink (mode 120000) pointing at a sensitive path, then explicitly call porcelain.checkout(paths=[...]) against a tag or ref where that same path is a regular executable blob; a plain clone or default full checkout does not trigger it. No public exploit code has been identified at time of analysis, and the issue is fixed in Dulwich 1.2.8.
RemediationAI
Vendor-released patch: upgrade Dulwich to 1.2.8 or later (fix commit 9389fcb5cb9113adfc7f207d8be86a56904db3e8; advisory https://github.com/jelmer/dulwich/security/advisories/GHSA-8w8g-wq8h-fq33). Until upgrading, the practical compensating control is to avoid calling porcelain.checkout(paths=[...]) on any repository whose history or worktree is not fully trusted, since a plain clone or default full checkout does not exercise the vulnerable routine; the trade-off is that selective file restore from tags becomes unavailable for untrusted inputs. Before performing a paths-restricted checkout, audit the worktree for symlink entries (for example, git ls-files -s | grep '^120000') and refuse or remove any that resolve outside the repository or into .git, accepting that this breaks legitimate repositories that intentionally track symlinks. Restricting repository sources to vetted internal origins and inspecting .git/hooks for unexpected post-checkout content provides an additional detection layer, but neither measure addresses the root cause and both require ongoing manual effort.
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 implementation of the Git protocol and filesystem, and this flaw is a classic CWE-59 link-following problem in its selective checkout routine. At dulwich/porcelain/__init__.py:5661-5675, checkout(paths=[...]) opens the destination with raw os.open(file_path, O_WRONLY|O_CREAT|O_TRUNC, mode) and writes the blob contents, but omits O_NOFOLLOW, so the call follows symlinks at both the final path component and intermediate directories. The path is first passed through _checked_worktree_path(), which only performs name validation - rejecting absolute paths and INVALID_DOTNAMES components - and performs no filesystem-level symlink resolution or containment check against the worktree root. Because this code path does not call build_file_from_blob() at all, it bypasses the symlink protections implemented there entirely. The attack abuses Git's own file modes: a worktree entry stored as mode 120000 becomes a symlink (e.g., ../../.git/hooks/post-checkout), while the same path in an attacker-chosen tag is stored as mode 100755 with a shell payload; restoring that path from the tag writes the payload through the symlink into the hooks directory, and the hook executes on the next checkout operation. The affected package is pip/dulwich, matching CPE cpe:2.3:a:jelmer:dulwich:*:*:*:*:*:*:*:*.
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
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AV:L and UI:R because the victim must locally process a crafted repo and invoke the paths= checkout; PR:N as the attacker needs no victim-side privileges; arbitrary file write to hooks yields RCE, so C:H/I:H/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Dulwich from 0.24.0 before 1.2.8 contains a symlink following vulnerability in porcelain.checkout(paths=[...]) that allows attackers to write arbitrary files by abusing raw os.open without O_NOFOLLOW. Attackers can craft a repository where a worktree symlink points to .git/hooks/post-checkout, so restoring the file from a tag writes a malicious hook for code execution.
Technical POC Analysis
CWE-59 (Improper Link Resolution Before File Access), with CWE-61 (UNIX Symbolic Link Following) also assigned by the advisory.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Dulwich 0.24.0 through 1.2.7 exposes development and CI environments that process untrusted repositories and use selective checkout to a high-severity path-handling flaw that can lead to code execution on the host. The risk is concentrated in teams that restore individual paths from attacker-controlled repositories; ordinary clone and full checkout workflows are not described as triggering the issue. Leadership should prioritize remediation because compromise of a developer endpoint or build runner can affect source integrity, credentials, and downstream software delivery, even though no public exploit identified at time of analysis.
Apply vendor patch.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in Dulwich Path Traversal and DoS Vulnerabilities
View all 5The build_index_from_tree function in index.py in Dulwich before 0.9.9 allows remote attackers to execute arbitrary code
Arbitrary code execution in Dulwich (pure-Python Git implementation) versions 0.23.2 through 1.2.4 allows a malicious up
Dulwich before 0.18.5, when an SSH subprocess is used, allows remote attackers to execute arbitrary commands via an ssh
Buffer overflow in the C implementation of the apply_delta function in _pack.c in Dulwich before 0.9.9 allows remote att
EUVD-2026-106899
GHSA-8wh8-hpg9-jvx8
NVD
CVE.org
EPSS
Exploit-DB