# Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows

Advisory record · `GHSA-897w-fcg9-f6xj`

- **Identifiers:** `GHSA-897w-fcg9-f6xj` · `CVE-2026-42305` · `PYSEC-2026-2463`
- **State:** Confirmed
- **Severity:** CVSS 8.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-22](https://cwe.mitre.org/data/definitions/22.html)
- **Tags:** [Path traversal](https://agentprime.io/advisories/tag/path-traversal.md)
- **Published:** 28 May 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 28 May 2026, 22:28 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `dulwich` (PyPI): affected `>=0.10.0, <1.2.5`; fixed in `1.2.5`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Dulwich versions 0.10.0 up to but not including 1.2.5 accept tree entries with NTFS-hostile names, such as ones containing backslashes, colons, or 8.3 short-name forms of .git. On Windows, cloning, fetching, or checking out a malicious repository can write files into the .git directory or outside the work tree, which can lead to code execution when Git runs a planted hook. Upgrade to Dulwich 1.2.5 or later. No pre-patch workaround is effective, since the core.protectNTFS setting was ignored in affected versions.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.8 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0063, the 51st percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:11 UTC: First seen by agentprime
- 31 Oct 2026, 14:11 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-897w-fcg9-f6xj)

## Sources

- [GitHub Advisory Database: GHSA-897w-fcg9-f6xj](https://github.com/advisories/GHSA-897w-fcg9-f6xj)
- [OSV: GHSA-897w-fcg9-f6xj](https://osv.dev/vulnerability/GHSA-897w-fcg9-f6xj)
- <https://github.com/jelmer/dulwich/security/advisories/GHSA-897w-fcg9-f6xj>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42305>
- <https://github.com/jelmer/dulwich/commit/49eb56e51aad637fc23d54bf2a08cb42739b8290>
- <https://github.com/jelmer/dulwich/commit/57efc4aa1581e038915a0fd79365be53b150f4a9>
- <https://github.com/jelmer/dulwich>
- <https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-897w-fcg9-f6xj>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-897w-fcg9-f6xj/>. Everything for agents: <https://agentprime.io/llms.txt>.
