Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.9

CVE-2026-122299: Dulwich before 1.2.20 may load attacker‑controlled code

CVE-2026-122299 · published 1 month ago
Summary

Projects that use Dulwich version earlier than 1.2.20 (for example Poetry 2.5.1) can be tricked into checking out a different set of files than what Git shows. An attacker can hide malicious build scripts in a specially crafted commit, causing those scripts to run when the code is installed or built. Updating Dulwich to version 1.2.20 or later removes the problem.

What to do
  • Update jelmer dulwich to version 1.2.20 or later.
Affected software
Ecosystem VendorProductAffected versions
– jelmer dulwich < 1.2.20
Debian:12 debian dulwich All versions
Ubuntu:16.04:LTS canonical dulwich All versions
Original advisory text
Dulwich before 1.2.20 Commit Parser Tree Header Misinterpretation
Dulwich before 1.2.20 contains a commit object parsing vulnerability where the read path in _parse_commit resolves a duplicate tree header to the last occurrence instead of the first, diverging from core git's resolution behavior, while Poetry 2.5.1 ships this version and uses dulwich by default for git dependency installation. Attackers can craft a commit object with two tree headers so that reviewers and CI using git see a benign tree while Poetry's dulwich-based checkout resolves to a different attacker-controlled tree containing malicious build scripts such as setup.py, resulting in unreviewed code execution on the install or build host.
Fix within
Internet-facing 14 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker full control
Severity
9.9 Critical
Exploitation
<1% chance of attack within 30 days
Type
CWE-1250Improper Preservation of Consistency Between Independent Representations of Shared State
CWE-115Misinterpretation of Input
Timeline
Published4 Nov 2026
Updated2 Dec 2026
First seen4 Nov 2026
Track software like this
Free during beta