CVE-2026-114098
Dulwich 0.22.5 before 1.2.8 Path Traversal via Stash Pop Symlinks
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.3
Dulwich 0.22.5 before 1.2.8 Path Traversal via Stash Pop Symlinks
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
CVE-2026-114098- CVSS 4.0
- 7.3 High
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 - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2026-106901
7.3
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
EUVD-2026-106901- CVSS 4.0
- 7.3 High
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-cm62-gvxx-vmxx
8.6
Dulwich: Symlink directory traversal in stash pop allows arbitrary file write via intermediate directory symlinks
Summary
Dulwich's stash.py:pop() function is vulnerable to symlink directory traversal, allowing an attacker to write arbitrary files outside the repository worktree when a victim pops a stash in a malicious repository.
Root Cause
The pop() function at dulwich/stash.py:236 uses os.path.exists(parent_dir) to check if a parent directory exists before writing stashed files. os.path.exists() follows symlinks, so when an intermediate directory in the path is a symlink pointing outside the worktree (e.g., link → ../../.git/hooks), the check passes and subsequent file writes resolve through the symlink.
The validate_path() function (line 228) only validates path component names against INVALID_DOTNAMES — it performs zero filesystem symlink detection. On dulwich 1.2.7 (latest release), build_file_from_blob() has no symlink protection whatsoever.
Impact
An attacker can craft a malicious repository that, when a victim clones it and performs a stash pop operation, writes attacker-controlled content to arbitrary filesystem locations. Writing to .git/hooks/post-checkout achieves Remote Code Execution on the victim's machine on the next git checkout operation.
Attack Scenario
- Attacker creates a repository with branch
maincontaininglink(symlink →../../.git/hooks) and branchfeaturecontaininglink/post-checkout(executable payload) - Victim clones the repository (landing on
main— symlinklinkexists in worktree) - Victim checks out
feature, makes changes, runsstash.push() - Victim checks out
main(restoring thelinksymlink) - Victim runs
stash.pop(0)— stash containslink/post-checkout os.path.exists("link")returns True (symlink to existing directory),os.makedirsskippedbuild_file_from_blob(blob, mode, "link/post-checkout")→open("link/post-checkout", "wb")follows the intermediate symlink → payload written to.git/hooks/post-checkout- Next checkout operation triggers the hook → RCE
Suggested Fix
Before writing any file, verify that no component of the target path resolves through a symlink outside the worktree. Use os.path.realpath(parent_dir) and confirm it stays within the repository root. Alternatively, use os.open() with O_NOFOLLOW on each path component.
Reported by zx (Jace)
- Record
GHSA-cm62-gvxx-vmxx- CVSS 3.1
- 8.6 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-22, CWE-59
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mw9m-763w-f8m9
7.3
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that...
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
GHSA-mw9m-763w-f8m9- CVSS 4.0
- 7.3 High
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
7.3
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
CVE-2026-114098- CVSS 4.0
- 7.3 High
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
7.3
Dulwich 0.22.5 before 1.2.8 Path Traversal via Stash Pop Symlinks
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
CVE-2026-114098- CVSS 4.0
- 7.3 High
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 - Weakness
- CWE-22
- Updated
- 2026-11-02
Show 4 moreShow less
OSVDEBIAN-CVE-2026-114098
7.3
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
DEBIAN-CVE-2026-114098- CVSS 4.0
- 7.3 High
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-cm62-gvxx-vmxx
8.6
Dulwich: Symlink directory traversal in stash pop allows arbitrary file write via intermediate directory symlinks
Summary
Dulwich's stash.py:pop() function is vulnerable to symlink directory traversal, allowing an attacker to write arbitrary files outside the repository worktree when a victim pops a stash in a malicious repository.
Root Cause
The pop() function at dulwich/stash.py:236 uses os.path.exists(parent_dir) to check if a parent directory exists before writing stashed files. os.path.exists() follows symlinks, so when an intermediate directory in the path is a symlink pointing outside the worktree (e.g., link → ../../.git/hooks), the check passes and subsequent file writes resolve through the symlink.
The validate_path() function (line 228) only validates path component names against INVALID_DOTNAMES — it performs zero filesystem symlink detection. On dulwich 1.2.7 (latest release), build_file_from_blob() has no symlink protection whatsoever.
Impact
An attacker can craft a malicious repository that, when a victim clones it and performs a stash pop operation, writes attacker-controlled content to arbitrary filesystem locations. Writing to .git/hooks/post-checkout achieves Remote Code Execution on the victim's machine on the next git checkout operation.
Attack Scenario
- Attacker creates a repository with branch
maincontaininglink(symlink →../../.git/hooks) and branchfeaturecontaininglink/post-checkout(executable payload) - Victim clones the repository (landing on
main— symlinklinkexists in worktree) - Victim checks out
feature, makes changes, runsstash.push() - Victim checks out
main(restoring thelinksymlink) - Victim runs
stash.pop(0)— stash containslink/post-checkout os.path.exists("link")returns True (symlink to existing directory),os.makedirsskippedbuild_file_from_blob(blob, mode, "link/post-checkout")→open("link/post-checkout", "wb")follows the intermediate symlink → payload written to.git/hooks/post-checkout- Next checkout operation triggers the hook → RCE
Suggested Fix
Before writing any file, verify that no component of the target path resolves through a symlink outside the worktree. Use os.path.realpath(parent_dir) and confirm it stays within the repository root. Alternatively, use os.open() with O_NOFOLLOW on each path component.
Reported by zx (Jace)
- Record
GHSA-cm62-gvxx-vmxx- CVSS 3.1
- 8.6 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-22, CWE-59
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-114098
7.3
Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout.
- Record
UBUNTU-CVE-2026-114098- CVSS 4.0
- 7.3 High
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 - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1791266024 No score
TuxCare security update for dulwich (8 CVEs)
TuxCare rebuilt dulwich to address 8 CVEs. Fixed in 0.25.2.post7+tuxcare.
- Record
CLSA-2026-1791266024- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
dulwichPyPI |
0.22.5 to 1.2.7 | 1.2.8 |
dulwichTuxCare:PyPI From an advisory covering 4 CVEs |
0.25.2 up to 0.25.2.post7+tuxcare, plus listed versions 0.25.2.post1+tuxcare0.25.2.post2+tuxcare0.25.2.post3+tuxcare0.25.2.post4+tuxcare0.25.2.post5+tuxcare0.25.2.post6+tuxcare |
0.25.2.post7+tuxcare |
dulwichDebian:12 |
All versions, plus listed versions 0.21.2-10.21.5-10.21.6-10.22.5-10.22.7-1 Show 17 moreShow less0.22.7-20.24.10-10.24.2-10.24.2-21.0.0-11.0.0-21.1.0-11.1.0-21.1.0-31.2.0-11.2.1-11.2.11-11.2.12-11.2.17-11.2.5-11.2.7-11.2.7-2 |
None known |
dulwichDebian:13 |
All versions, plus listed versions 0.22.7-10.22.7-20.24.10-10.24.2-10.24.2-2 Show 13 moreShow less1.0.0-11.0.0-21.1.0-11.1.0-21.1.0-31.2.0-11.2.1-11.2.11-11.2.12-11.2.17-11.2.5-11.2.7-11.2.7-2 |
None known |
dulwichDebian:14 |
before 1.2.8-1, plus listed versions 0.22.7-10.22.7-20.24.10-10.24.2-10.24.2-2 Show 10 moreShow less1.0.0-11.0.0-21.1.0-11.1.0-21.1.0-31.2.0-11.2.1-11.2.5-11.2.7-11.2.7-2 |
1.2.8-1 |
dulwichPyPI |
0.22.5 up to 1.2.8, plus listed versions 0.22.60.22.70.22.80.23.00.23.1 Show 25 moreShow less0.23.20.24.00.24.10.24.100.24.20.24.30.24.40.24.50.24.60.24.70.24.80.24.90.25.00.25.10.25.21.0.01.1.01.2.01.2.11.2.21.2.31.2.41.2.51.2.61.2.7 |
1.2.8 |
dulwichUbuntu:16.04:LTS |
All versions, plus listed versions 0.11.2-1ubuntu10.12.0-10.12.0-1build10.12.0-1build2 |
None known |
dulwichUbuntu:18.04:LTS |
All versions, plus listed versions 0.18.2-1build10.18.5-1 |
None known |
dulwichUbuntu:20.04:LTS |
All versions, plus listed versions 0.19.11-20.19.14-4ubuntu10.19.15-10.19.15-1build1 |
None known |
dulwichUbuntu:22.04:LTS |
All versions, plus listed versions 0.20.15-1ubuntu10.20.31-1ubuntu10.20.31-1.10.20.31-1.1build1 |
None known |
dulwichUbuntu:24.04:LTS |
All versions, plus listed versions 0.21.6-10.21.6-1build10.21.6-1build2 |
None known |
dulwichUbuntu:26.04:LTS |
All versions, plus listed versions 0.22.7-10.24.2-21.1.0-2ubuntu11.1.0-3 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-114098 is a high vulnerability (CVSS 7.3) in Jelmer Dulwich, published October 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.15%, the 4th percentile. Fixed in dulwich 1.2.8.
References
github.com/jelmer/dulwich/security/advisories/GHSA-cm62-gvxx-vmxx
vulncheck.com/advisories/dulwich-0.22.5-before-1.2.8-path-traversal-via-stash-pop-symlinks
github.com/jelmer/dulwich/commit/40a542cb02f9ac39a9eeac1193472903098698f9
github.com/jelmer/dulwich/releases/tag/dulwich-1.2.8
github.com/advisories/GHSA-cm62-gvxx-vmxx
nvd.nist.gov/vuln/detail/CVE-2026-114098