# CVE-2026-42305: Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-06-10 · Modified: 2026-06-12
- Aliases: GHSA-897w-fcg9-f6xj, PYSEC-2026-2463, UBUNTU-CVE-2026-42305, DEBIAN-CVE-2026-42305, CGA-3f9h-fqqj-8m8w, CGA-4p92-4vrp-2354, CGA-87qc-mcq3-cf4p, CGA-8pj8-6886-vhm2, CGA-8qv8-85wh-5v98, CGA-9q6r-69rh-7gv3, CGA-g3xv-xjr6-hww9, CGA-rw26-pwc6-q5rc, CGA-4958-8q5f-9524, CGA-fmw5-gffr-9fhg
- Record: https://cvemate.com/vulnerability/CVE-2026-42305 · JSON: https://cvemate.com/vulnerability/CVE-2026-42305/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.635%, percentile 51.912%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard kserve-storage-controller (Chainguard): \< 0.18.0-r4
- chainguard py3-cassandra-medusa (Chainguard): \< 0.29.0-r0
- chainguard request-1276 (Chainguard): All versions (No fix recorded)
- wolfi kserve-storage-controller (Wolfi): \< 0.18.0-r4
- wolfi py3-cassandra-medusa (Wolfi): \< 0.29.0-r0
- debian dulwich (Debian): All versions (No fix recorded)
- ubuntu dulwich (Ubuntu): All versions (No fix recorded)
- jelmer dulwich: ≥ 0.10.0, \< 1.2.5
- PyPI dulwich (PyPI): ≥ 0.10.0, \< 1.2.5

## References

- <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>
- <https://github.com/jelmer/dulwich>
- <https://pypi.org/project/dulwich>
- <https://github.com/advisories/GHSA-897w-fcg9-f6xj>
- <https://ubuntu.com/security/CVE-2026-42305>
- <https://www.cve.org/CVERecord?id=CVE-2026-42305>
- <https://security-tracker.debian.org/tracker/CVE-2026-42305>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42305.json>

---

Data as of 2026-12-05T14:15:07.267Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
