Path Traversal in dulwich (CVE-2026-42305)
Summary
Path traversal in dulwich (CVE-2026-42305). Successful exploitation can lead to full system takeover. Mitigation: upgrade to 1.2.5 or later.
Original description
The description as published by the source.
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…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-42305 has been found in dulwich.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
What to do: upgrade dulwich to 1.2.5 or later.
If unsure, ask your IT team or search "dulwich CVE-2026-42305" on the vendor's site.
CVE-2026-42305 (dulwich) — CWE-22 / CVSS v3 8.8
Attack vector: remote (network-reachable) / unauthenticated
Patched: 1.2.5 — apply immediately
Workaround: There is no effective pre-patch workaround.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in dulwich.
Check the vendor advisory for the affected versions of dulwich.
Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.
Update to 1.2.5.
Workaround: There is no effective pre-patch workaround.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'dulwich' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'dulwich' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
dulwichを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
There is no effective pre-patch workaround.パッチが適用されるまでの応急処置として、There is no effective pre-patch workaround. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade dulwich to 1.2.5ステージング環境で 1.2.5 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-42305 dulwich
- Ubuntu UBUNTU-CVE-2026-42305 dulwich
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com