# CVE-2026-42563: Dulwich Vulnerable to Command Injection via Merge Driver Path

- Severity: High 7.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-28T22:29:22.000Z
- Modified: 2026-09-10T03:51:05.165Z
- Also known as: GHSA-9277-mp7x-85jf, PYSEC-2026-2464
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

Dulwich is a pure-Python implementation of the Git file formats and protocols. Starting in version 0.24.0 and prior to version 1.2.5, Dulwich's `ProcessMergeDriver` substitutes the file path (from the git tree, controllable by an attacker via a malicious branch) into the merge driver command via the `%P` placeholder and executes it with `subprocess.run(..., shell=True)`. An attacker who can cause a victim to merge an untrusted branch can achieve arbitrary command execution by crafting malicious file paths. Version 1.2.5 fixes the issue.

(As written by CVE List.)

## Affected

- jelmer dulwich: >= 0.24.0, < 1.2.5
- dulwich (PyPI): from 0.24.0 before 1.2.5

## Every score

- GitHub_M: CVSS:4.0 7.7 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/jelmer/dulwich/security/advisories/GHSA-9277-mp7x-85jf> (exploit, web)
- <https://github.com/jelmer/dulwich/commit/e3331b3b3a122fc313460182f928f59723580b7b> (web)
- <https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42563> (advisory)
- <https://github.com/jelmer/dulwich> (package)
- <https://pypi.org/project/dulwich> (package)
- <https://github.com/advisories/GHSA-9277-mp7x-85jf> (advisory)

## Sources

- CVE List: [CVE-2026-42563](https://www.cve.org/CVERecord?id=CVE-2026-42563), CVE Terms of Use, modified 2026-06-12
- GitHub Advisory Database: [GHSA-9277-mp7x-85jf](https://github.com/advisories/GHSA-9277-mp7x-85jf), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-42563](https://nvd.nist.gov/vuln/detail/CVE-2026-42563), Public domain, modified 2026-07-21
- PyPA Advisory Database: [PYSEC-2026-2464](https://osv.dev/vulnerability/PYSEC-2026-2464), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-42563 · Whole record: https://cve.day/CVE-2026-42563.json · Rebuilt by cve.day 2026-11-25T22:59:24.391Z
