{"answers":{"affected":"3 open source packages ship an affected version, including dulwich.","exploited":"There is no known exploitation of CVE-2026-42305 in the wild and no public exploit code.","fix":"Upgrade dulwich to 1.2.5 or later.","what":"CVE-2026-42305 is a high-severity path traversal vulnerability in jelmer dulwich, published on 10 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-42305 and fix it if it is affected.\n\nWhat it is: CVE-2026-42305 is a high-severity path traversal vulnerability in jelmer dulwich, published on 10 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-42305 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- dulwich (PyPI): affected from 0.10.0; fixed in 1.2.5\n- dulwich (PyPI): affected from 0.10.0; fixed in 1.2.5\n- dulwich (PyPI): affected from 0.10.0; fixed in 1.2.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42305/ (Markdown: https://insights.sbomify.com/CVE-2026-42305/index.md)","id":"CVE-2026-42305","markdown":"https://insights.sbomify.com/CVE-2026-42305/index.md","name":"CVE-2026-42305","record":{"aliases":["AZL-90074","CLEANSTART-2026-QB74422","CLSA-2026-1781225617","CLSA-2026-1791190774","ECHO-89fa-d0fd-2f03","GHSA-897w-fcg9-f6xj","MINI-fc3v-8vj4-4vv8","PYSEC-2026-2463","ROOT-APP-PYPI-CVE-2026-42305","UBUNTU-CVE-2026-42305"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Python Git library","requires_auth":"none","summary":"Attackers can achieve remote code execution on Windows by tricking users into cloning malicious Git repositories using the Dulwich library.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"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. After upgrading the NTFS validator is on by default on every platform, so no additional configuration is required.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows","id":"CVE-2026-42305","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Moby: Race condition in docker cp allows bind mount redirection to host path","id":"CVE-2026-42306"},"packages":[{"ecosystem":"PyPI","fixed":["1.2.5"],"introduced":["0.10.0"],"last_affected":[],"package":"dulwich","purl":null,"source":"GHSA-897w-fcg9-f6xj"},{"ecosystem":"PyPI","fixed":["1.2.5"],"introduced":["0.10.0"],"last_affected":[],"package":"dulwich","purl":"pkg:pypi/dulwich","source":"GHSA-897w-fcg9-f6xj"},{"ecosystem":"PyPI","fixed":["1.2.5"],"introduced":["0.10.0"],"last_affected":[],"package":"dulwich","purl":"pkg:pypi/dulwich","source":"PYSEC-2026-2463"}],"prev":{"headline":"Twisted: Denial of Service (DoS) in twisted.names via Crafted DNS Compression Pointer Chains","id":"CVE-2026-42304"},"products":["dulwich"],"published":"2026-06-10","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-12","vendors":["jelmer"]},"summary":"Attackers can achieve remote code execution on Windows by tricking users into cloning malicious Git repositories using the Dulwich library.","url":"https://insights.sbomify.com/CVE-2026-42305/"}