Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. dulwich
  4. ›
  5. GHSA-8mcx-5rqc-vhmf

GHSA-8mcx-5rqc-vhmf: Dulwich: Arbitrary File Write (RCE) on Windows via Unvalidated Drive Letters in Tree Paths

October 2, 2026

A High-severity Path Traversal vulnerability exists in Dulwich’s checkout logic when running on Windows. The functions responsible for validating NTFS paths strictly reject .git variants, Alternate Data Streams (ADS), git~1 short names, and reserved device names, but they completely fail to check for DOS drive letter prefixes.

A malicious Git tree can contain an entry named C:. When Dulwich processes this tree on a Windows client, the string passes the validate_path_element_ntfs check. Later, _tree_to_fs_path passes this path to os.path.join(root, b"C:\\\\Users\\\\...").

On Windows, if the second argument to os.path.join contains an absolute drive letter, the root path is completely discarded. As a result, Dulwich writes the repository file to the absolute path outside of the intended Git worktree.

While the standard C git client explicitly blocks this via has_dos_drive_prefix() in path.c, Dulwich lacks this protection. Because Git trees are cross-platform, an attacker can author a malicious repository on Linux and wait for a Windows victim (or CI runner) to clone it.

References

  • github.com/advisories/GHSA-8mcx-5rqc-vhmf
  • github.com/jelmer/dulwich/commit/4ca77f9f470742ba246cd6fa07beb6d735045664
  • github.com/jelmer/dulwich/releases/tag/dulwich-1.2.9
  • github.com/jelmer/dulwich/security/advisories/GHSA-8mcx-5rqc-vhmf

Code Behaviors & Features

Detect and mitigate GHSA-8mcx-5rqc-vhmf with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.2.9

Fixed versions

  • 1.2.9

Solution

Upgrade to version 1.2.9 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/dulwich/GHSA-8mcx-5rqc-vhmf.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 Oct 2026 00:22:31 +0000.