Dulwich Windows Git Path Flaw Enables Arbitrary File Write and RCE
A high-severity flaw in Dulwich tracked as CVE-2026-42305 allows arbitrary file write and potential remote code execution on Windows when a user clones, fetches, or checks out a malicious Git repository. The bug affects versions 0.10.0 through 1.2.4 and stems from improper validation of tree entry names that Windows interprets as path syntax, including backslashes, NTFS alternate data stream markers, and NTFS 8.3 short-name aliases tied to .git. A crafted repository can write files outside the work tree or place executable content such as .git\hooks\pre-commit.exe inside the victim’s Git metadata, which Git for Windows may later execute in the user’s context.
The project released Dulwich 1.2.5 to fix the issue, correcting mishandled core.protectNTFS and core.protectHFS configuration names, enabling core.protectNTFS by default on all platforms, and tightening checks to block dangerous names including reserved Windows devices like CON, NUL, COM1, and LPT1. Release notes say the update also addresses other security bugs, including unsafe submodule path handling, shell command injection in ProcessMergeDriver, unsafe patch filename generation, and improper receive.maxInputSize enforcement. Maintainers said there is no effective workaround short of upgrading, and warned that even POSIX users can unknowingly propagate malicious trees to Windows users through pushes or republished repositories.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
3 events from the most recent confirmed update back to the earliest known activity.
CVE-2026-42305 entry published for Dulwich vulnerability
On 2026-06-10, CVE-2026-42305 was published describing the Dulwich Windows arbitrary file write vulnerability affecting versions before 1.2.5. The entry noted there was no effective pre-patch workaround and advised users to upgrade.
Dulwich publishes advisory for Windows arbitrary file write flaw
On 2026-05-28, a GitHub security advisory disclosed a vulnerability in Dulwich versions 0.10.0 through 1.2.4 that can allow arbitrary file write and possible remote code execution on Windows when cloning, fetching, or checking out a malicious repository. The advisory said version 1.2.5 fixes the issue by correcting configuration handling, enabling core.protectNTFS by default, and tightening NTFS path validation.
Dulwich releases security update version 1.2.5
Dulwich released version 1.2.5 as a security update on 2026-05-28 and urged users to upgrade. The release fixes multiple vulnerabilities, including the Windows NTFS-hostile tree entry flaw later tracked as CVE-2026-42305.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
5 references tracked. Mallory keeps watching after this page renders.
CVE-2026-42305 - Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows
cvefeed.io
Open sourceArbitrary file write via NTFS-hostile tree entries on Windows · Advisory · jelmer/dulwich · GitHub
github.com
Open sourceRelease dulwich 1.2.5 · jelmer/dulwich · GitHub
github.com
Open sourceAdd NEWS entry for CVE-2026-42305 · jelmer/dulwich@49eb56e · GitHub
github.com
Open sourceMerge branch 'advisory-1' · jelmer/dulwich@57efc4a · GitHub
github.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


