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

High 7.7 Published Updated

Attackers can execute arbitrary commands by tricking users into merging malicious branches containing crafted file paths in Dulwich.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-42563?

CVE-2026-42563 is a high-severity command injection 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.

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.

Weakness: CWE-78

Which versions are affected by CVE-2026-42563?

3 open source packages ship an affected version, including dulwich.

PackageAffectedFixed in
dulwich PyPIFrom 0.24.01.2.5
dulwich PyPIFrom 0.24.01.2.5
dulwich PyPIFrom 0.24.01.2.5

How do I fix CVE-2026-42563?

Upgrade dulwich to 1.2.5 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-42563 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42563 exists.

Sources

Also known as CLEANSTART-2026-MJ32285, CLSA-2026-1781052734, DEBIAN-CVE-2026-42563, ECHO-b3a3-3b48-f3fe, GHSA-9277-mp7x-85jf, MINI-2p86-fr3m-g34v and 3 more.

Is CVE-2026-42563 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free