Vulnerability · Published Jun 10, 2026 · Assigned by GitHub_M
CVE-2026-42563Dulwich Vulnerable to Command Injection via Merge Driver Path
High 7.7
In plain English
A high-severity OS command injection in dulwich from jelmer. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | dulwich | no fix listed | DEBIAN-CVE-2026-42563 |
| Debian:13 | dulwich | no fix listed | DEBIAN-CVE-2026-42563 |
| Debian:14 | dulwich | 1.2.5-1 | DEBIAN-CVE-2026-42563 |
| PyPI | dulwich | 1.2.5 | GHSA-9277-mp7x-85jf |
| PyPI | dulwich | 1.2.5 | PYSEC-2026-2464 |
| Ubuntu:22.04:LTS | dulwich | no fix listed | UBUNTU-CVE-2026-42563 |
| Ubuntu:24.04:LTS | dulwich | no fix listed | UBUNTU-CVE-2026-42563 |
| Ubuntu:25.10 | dulwich | no fix listed | UBUNTU-CVE-2026-42563 |
| Ubuntu:26.04:LTS | dulwich | no fix listed | UBUNTU-CVE-2026-42563 |
| Ubuntu:26.10 | dulwich | no fix listed | UBUNTU-CVE-2026-42563 |
Affected products (as reported)
Weakness: CWE-78 · Vector: 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 x_refsource_CONFIRM
- https://github.com/jelmer/dulwich/commit/e3331b3b3a122fc313460182f928f59723580b7b x_refsource_MISC
- https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.5 x_refsource_MISC