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.
Impact
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:
- \ — the Windows path separator. A single tree entry named .git\hooks\pre-commit.exe was treated as one valid filename on POSIX but materialized as nested directories .git/hooks/pre-commit.exe on Windows, planting a file inside the victim's .git directory. Git for Windows then
executes that hook on the next git commit, giving the attacker arbitrary code execution in the victim's user context. The same primitive can be used with ..\outside.txt to escape the work tree. - : — the NTFS alternate-data-stream marker. .git::$INDEX_ALLOCATION writes directly into the victim's .git entity, bypassing the .git-as-a-directory check.
- git~ — NTFS 8.3 short-name aliases of .git. Only the literal git
1 was rejected; git2, git10, GIT1, etc. were all accepted.
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 Dulwi…
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 nvd.nist.gov
- package github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web security-advisories@github.com
- web security-advisories@github.com