CVE-2026-42305
CVE-2026-42305 · Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows
This page contains facts from public vulnerability sources. Check the original advisory before updating.
Dulwich is a pure-Python implementation of the Git file formats and protocols. Versions starting with 0.10.0 and prior to 1.2.5 have an arbitrary file write leading to remote code execution when cloning or checking out a malicious Git repository on Windows. Dulwich's path-element validator accepted tree entries whose filenames contained bytes that Windows interprets as structural path syntax. Contributing configuration bugs made matters worse. The core.protectNTFS and core.protectHFS settings were looked up under a wrong option name and so user-set values were silently ignored, and core.protectNTFS only defaulted to true on Windows (Git upstream has defaulted it to true everywhere since CVE-2019-1353). Both have been corrected. Anyone who clones, fetches, or checks out an untrusted repository with Dulwich on Windows - either through the Dulwich CLI, porcelain.clone, or any downstream tool built on Dulwich - is impacted. POSIX clones are not directly exploitable (on POSIX \ is a literal filename byte), but a POSIX user can unknowingly propagate a malicious tree to Windows consumers via push or re-publication. This issue is fixed in Dulwich 1.2.5. Users should upgrade to 1.2.5 or later. There is no effective pre-patch workaround. On affected versions the core.protectNTFS configuration key was silently ignored, so setting it to true does not mitigate the issue. Users who cannot upgrade should avoid cloning, fetching, or checking out untrusted repositories with Dulwich on Windows. After upgrading the NTFS validator is on by default on every platform, so no additional configuration is required.
CVSS 8.8 · High · EPSS 0.9% · Fix available
- Published
- Updated
Affected products and versions
dulwich
- Versions
- >= 0.10.0, < 1.2.5: Affected
No fix published
dulwich PyPI
- Versions
- 0.10.0
- 0.10.1a
- 0.11.0
- 0.11.1
- 0.11.2
- 0.12.0
- 0.13.0
- 0.14.0
- 0.14.1
- 0.15.0
- 0.16.0
- 0.16.1
- 0.16.2
- 0.16.3
- 0.17.1
- 0.17.2
- 0.17.3
- 0.18.0
- 0.18.1
- 0.18.2
- 0.18.3
- 0.18.4
- 0.18.5
- 0.18.6
- 0.19.0
- 0.19.1
- 0.19.10
- 0.19.11
- 0.19.12
- 0.19.13
- 0.19.14
- 0.19.15
- 0.19.16
- 0.19.2
- 0.19.3
- 0.19.3a0
- 0.19.4
- 0.19.5
- 0.19.6
- 0.19.7
- 0.19.8
- 0.19.9
- 0.20.0
- 0.20.1
- 0.20.10
- 0.20.11
- 0.20.12
- 0.20.13
- 0.20.14
- 0.20.15
- 0.20.17
- 0.20.18
- 0.20.19
- 0.20.2
- 0.20.20
- 0.20.21
- 0.20.22
- 0.20.23
- 0.20.24
- 0.20.25
- 0.20.26
- 0.20.27
- 0.20.28
- 0.20.29
- 0.20.3
- 0.20.30
- 0.20.31
- 0.20.32
- 0.20.33
- 0.20.34
- 0.20.35
- 0.20.36
- 0.20.37
- 0.20.38
- 0.20.39
- 0.20.4
- 0.20.40
- 0.20.41
- 0.20.42
- 0.20.43
- 0.20.44
- 0.20.45
- 0.20.46
- 0.20.47
- 0.20.48
- 0.20.49
- 0.20.5
- 0.20.50
- 0.20.6
- 0.20.7
- 0.20.8
- 0.20.9
- 0.21.0
- 0.21.1
- 0.21.2
- 0.21.3
- 0.21.4
- 0.21.4.1
- 0.21.5
- 0.21.6
- 0.21.7
- 0.22.0
- 0.22.1
- 0.22.3
- 0.22.4
- 0.22.5
- 0.22.6
- 0.22.7
- 0.22.8
- 0.23.0
- 0.23.1
- 0.23.2
- 0.24.0
- 0.24.1
- 0.24.10
- 0.24.2
- 0.24.3
- 0.24.4
- 0.24.5
- 0.24.6
- 0.24.7
- 0.24.8
- 0.24.9
- 0.25.0
- 0.25.1
- 0.25.2
- 1.0.0
- 1.1.0
- 1.2.0
- 1.2.1
- 1.2.2
- 1.2.3
- 1.2.4
- Affected ranges
- ECOSYSTEM: ≥ 0.10.0, < 1.2.5
Update to 1.2.5
dulwich Ubuntu:16.04:LTS
- Versions
- 0.11.2-1ubuntu1
- 0.12.0-1
- 0.12.0-1build1
- 0.12.0-1build2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:18.04:LTS
- Versions
- 0.18.2-1build1
- 0.18.5-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:20.04:LTS
- Versions
- 0.19.11-2
- 0.19.14-4ubuntu1
- 0.19.15-1
- 0.19.15-1build1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:22.04:LTS
- Versions
- 0.20.15-1ubuntu1
- 0.20.31-1ubuntu1
- 0.20.31-1.1
- 0.20.31-1.1build1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:24.04:LTS
- Versions
- 0.21.6-1
- 0.21.6-1build1
- 0.21.6-1build2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:25.10
- Versions
- 0.22.7-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:26.10
- Versions
- 1.1.0-3
- 1.2.12-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
dulwich Ubuntu:26.04:LTS
- Versions
- 0.22.7-1
- 0.24.2-2
- 1.1.0-2ubuntu1
- 1.1.0-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- https://github.com/jelmer/dulwich/security/advisories/GHSA-897w-fcg9-f6xj
- https://github.com/jelmer/dulwich/commit/49eb56e51aad637fc23d54bf2a08cb42739b8290
- https://github.com/jelmer/dulwich/commit/57efc4aa1581e038915a0fd79365be53b150f4a9
- https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5
- https://nvd.nist.gov/vuln/detail/CVE-2026-42305