Every CVE Search/ Get API key

CVE-2026-114096

Dulwich 0.24.0 before 1.2.8 Symlink Write-Through via porcelain.checkout paths

7.3 HighFix available

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.

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

0.15%Unchanged since Oct 21, 2026
90%50%10%1%

What each source reports

CVE List Score used 7.3

Dulwich 0.24.0 before 1.2.8 Symlink Write-Through via porcelain.checkout paths

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.

Record
CVE-2026-114096
CVSS 4.0
7.3 HighCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-59
Updated
2026-11-02
EUVDEUVD-2026-106899 7.3

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.

Record
EUVD-2026-106899
CVSS 4.0
7.3 HighCVSS: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-8w8g-wq8h-fq33 8.6

Dulwich: Symlink write-through in checkout(paths=[]) via raw os.open bypasses all symlink protections

Summary

Dulwich's porcelain.checkout(paths=[...]) code path writes files using raw os.open(file_path, O_WRONLY|O_CREAT|O_TRUNC, mode) followed by f.write(obj.data). This code path does NOT call build_file_from_blob() at all, completely bypassing any symlink protections (including the unreleased d09f8af fix). os.open without O_NOFOLLOW follows symlinks at both the target file and intermediate directories, allowing arbitrary file writes.

Root Cause

At dulwich/porcelain/__init__.py:5661-5675, the checkout(paths=[...]) implementation:

file_path = _checked_worktree_path(r, path)
os.makedirs(os.path.dirname(file_path), exist_ok=True)
flags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
with os.fdopen(os.open(file_path, flags, mode), "wb") as f:
    f.write(obj.data)

_checked_worktree_path() (line 601-631) only performs name validation — checking that the path doesn't start with / or \\ and that components pass INVALID_DOTNAMES checks. It performs zero filesystem symlink detection.

Impact

An attacker can craft a malicious repository that, when a victim clones it and runs checkout(paths=[...]), writes attacker-controlled content (with attacker-controlled permissions) to any filesystem location accessible to the user. Writing to .git/hooks/post-checkout achieves RCE on the next git checkout.

Attack Scenario

  1. Attacker creates a repository where HEAD has trigger as a symlink (mode 120000, content ../../.git/hooks/post-checkout), and tag v1.0 has trigger as an executable file (mode 100755, content #!/bin/sh\nmalicious_payload)
  2. Victim clones the repository — worktree has trigger → ../../.git/hooks/post-checkout (a symlink)
  3. Victim runs porcelain.checkout(repo, target="v1.0", paths=["trigger"]) to restore a specific file from a tag
  4. _checked_worktree_path(r, "trigger") passes — name validation only, no symlink check
  5. os.open("trigger", O_WRONLY|O_CREAT|O_TRUNC, 0o755) follows the symlink → opens .git/hooks/post-checkout for writing
  6. f.write(obj.data) writes the malicious payload to the hook
  7. Next checkout operation triggers the hook → RCE

Suggested Fix

Replace the raw os.open path with a call to build_file_from_blob (once that function is hardened against intermediate symlinks), or add explicit symlink detection: resolve the path with os.path.realpath() and verify it stays within the worktree root before opening.

Reported by zx (Jace)

Record
GHSA-8w8g-wq8h-fq33
CVSS 3.1
8.6 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-59, CWE-61
Updated
2026-11-02
GitHub AdvisoriesGHSA-8wh8-hpg9-jvx8 7.3

Dulwich from 0.24.0 before 1.2.8 contains a symlink following vulnerability in porcelain.checkout...

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.

Record
GHSA-8wh8-hpg9-jvx8
CVSS 4.0
7.3 HighCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-59
Updated
2026-11-02
NVD 7.3

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.

Record
CVE-2026-114096
CVSS 4.0
7.3 HighCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-59
Updated
2026-11-02
OSV 7.3

Dulwich 0.24.0 before 1.2.8 Symlink Write-Through via porcelain.checkout paths

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.

Record
CVE-2026-114096
CVSS 4.0
7.3 HighCVSS: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-59
Updated
2026-11-02
Show 4 moreShow less
OSVDEBIAN-CVE-2026-114096 7.3

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.

Record
DEBIAN-CVE-2026-114096
CVSS 4.0
7.3 HighCVSS: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-8w8g-wq8h-fq33 8.6

Dulwich: Symlink write-through in checkout(paths=[]) via raw os.open bypasses all symlink protections

Summary

Dulwich's porcelain.checkout(paths=[...]) code path writes files using raw os.open(file_path, O_WRONLY|O_CREAT|O_TRUNC, mode) followed by f.write(obj.data). This code path does NOT call build_file_from_blob() at all, completely bypassing any symlink protections (including the unreleased d09f8af fix). os.open without O_NOFOLLOW follows symlinks at both the target file and intermediate directories, allowing arbitrary file writes.

Root Cause

At dulwich/porcelain/__init__.py:5661-5675, the checkout(paths=[...]) implementation:

file_path = _checked_worktree_path(r, path)
os.makedirs(os.path.dirname(file_path), exist_ok=True)
flags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
with os.fdopen(os.open(file_path, flags, mode), "wb") as f:
    f.write(obj.data)

_checked_worktree_path() (line 601-631) only performs name validation — checking that the path doesn't start with / or \\ and that components pass INVALID_DOTNAMES checks. It performs zero filesystem symlink detection.

Impact

An attacker can craft a malicious repository that, when a victim clones it and runs checkout(paths=[...]), writes attacker-controlled content (with attacker-controlled permissions) to any filesystem location accessible to the user. Writing to .git/hooks/post-checkout achieves RCE on the next git checkout.

Attack Scenario

  1. Attacker creates a repository where HEAD has trigger as a symlink (mode 120000, content ../../.git/hooks/post-checkout), and tag v1.0 has trigger as an executable file (mode 100755, content #!/bin/sh\nmalicious_payload)
  2. Victim clones the repository — worktree has trigger → ../../.git/hooks/post-checkout (a symlink)
  3. Victim runs porcelain.checkout(repo, target="v1.0", paths=["trigger"]) to restore a specific file from a tag
  4. _checked_worktree_path(r, "trigger") passes — name validation only, no symlink check
  5. os.open("trigger", O_WRONLY|O_CREAT|O_TRUNC, 0o755) follows the symlink → opens .git/hooks/post-checkout for writing
  6. f.write(obj.data) writes the malicious payload to the hook
  7. Next checkout operation triggers the hook → RCE

Suggested Fix

Replace the raw os.open path with a call to build_file_from_blob (once that function is hardened against intermediate symlinks), or add explicit symlink detection: resolve the path with os.path.realpath() and verify it stays within the worktree root before opening.

Reported by zx (Jace)

Record
GHSA-8w8g-wq8h-fq33
CVSS 3.1
8.6 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weakness
CWE-59, CWE-61
Updated
2026-11-02
OSVUBUNTU-CVE-2026-114096 7.3

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.

Record
UBUNTU-CVE-2026-114096
CVSS 4.0
7.3 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
dulwich
PyPI
0.24.0 to 1.2.7
1.2.8
dulwich
TuxCare: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
dulwich
Debian: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 less
0.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
dulwich
Debian: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 less
1.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
dulwich
Debian: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 less
1.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
dulwich
PyPI
0.24.0 up to 1.2.8, plus listed versions
0.24.10.24.100.24.20.24.30.24.4
Show 18 moreShow less
0.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
dulwich
Ubuntu:16.04:LTS
All versions, plus listed versions
0.11.2-1ubuntu10.12.0-10.12.0-1build10.12.0-1build2
None known
dulwich
Ubuntu:18.04:LTS
All versions, plus listed versions
0.18.2-1build10.18.5-1
None known
dulwich
Ubuntu:20.04:LTS
All versions, plus listed versions
0.19.11-20.19.14-4ubuntu10.19.15-10.19.15-1build1
None known
dulwich
Ubuntu: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
dulwich
Ubuntu:24.04:LTS
All versions, plus listed versions
0.21.6-10.21.6-1build10.21.6-1build2
None known
dulwich
Ubuntu:26.04:LTS
All versions, plus listed versions
0.22.7-10.24.2-21.1.0-2ubuntu11.1.0-3
None known

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-114096 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

Show 6 moreShow less
MoveEnter Open