dulwich

CVE-2026-42563

CVE-2026-42563 is a high-severity OS command injection vulnerability in dulwich (pip), affecting versions >= 0.24.0, < 1.2.5. It is fixed in 1.2.5.

Key facts
CVSS score
N/A
High
Attack vector
Not available
Issuing authority
GitHub Advisory Database
Affected package
dulwich
Fixed in
1.2.5
Disclosed
2026

Summary

Summary 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. Description Type: Command Injection Source: merge.py line 195, path from merge tree (from repository content when merging untrusted branch) Sink: mergedrivers.py lines 124–127, subprocess.run(cmd, shell=True) where cmd includes path via %P placeholder Impact: Arbitrary code execution when merging from a malicious repository. Requires the user to have a merge driver configured that uses the %P placeholder. Resources Repository: https://github.com/dulwich/dulwich Vulnerable file: dulwich/mergedrivers.py (lines 119–129) Proof of Concept Fix mergedriversshellescape.patch

Impact

What is OS command injection?

Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.

Affected versions

pip

  • dulwich (>= 0.24.0, < 1.2.5)

Security releases

  • dulwich → 1.2.5 (pip)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's Application Detection and Response identifies whether CVE-2026-42563 is reachable in your applications. Explore runtime application protection for your team.

See if CVE-2026-42563 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-42563 in your environment

Remediation advice

Upgrade dulwich to 1.2.5 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-42563

What is CVE-2026-42563?

CVE-2026-42563 is a high-severity OS command injection vulnerability in dulwich (pip), affecting versions >= 0.24.0, < 1.2.5. It is fixed in 1.2.5. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.

Which versions of dulwich are affected by CVE-2026-42563?

dulwich (pip) versions >= 0.24.0, < 1.2.5 is affected.

Is there a fix for CVE-2026-42563?

Yes. CVE-2026-42563 is fixed in 1.2.5. Upgrade to this version or later.

Is CVE-2026-42563 exploitable, and should I be worried?

Whether CVE-2026-42563 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-42563 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-42563?

Upgrade dulwich to 1.2.5 or later.

Stop the waste.
Protect your environment with Kodem.