CVE-2026-42563

High

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.

SeverityHigh
CVSS7.7
Exploit probability—
ProductDulwich
PublishedJun 10, 2026
First seenJun 10, 2026

How to fix

Update
  • dulwich1.2.5 or later

Affected products

ProductAffected versionsFixed in
dulwichPyPI0.24.0 ≤ v < 1.2.51.2.5

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.