Skip to main content
← Vulnerabilities

Dulwich before 1.2.20 Commit Parser Tree Header Misinterpretation

Dulwich versions before 1.2.20 are affected, and Poetry 2.5.1 ships one and uses Dulwich by default for git dependency installs. Fixed in Dulwich 1.2.20.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.6HighCNA
Exploited
No known exploitation
Fix
Fixed in 1.2.20
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. Dulwich versions before 1.2.20 Poetry 2.5.1 ships this vulnerable dulwich version and uses dulwich by default for git dependency installation The attacker crafts a commit object containing two tree headers

21Pcve.now Index 21 of 100 · methodology v3 · provisional
  • Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
  • Exposure12/25Specific setups only, reachable over the network without a login
  • Reach?/20Reach: unknown (data gap). No tracked technology or package matched
  • Severity8.6/10CVSS 8.6
  • No patch0/5No signal

What would change the score

  • Would score about 71 if added to CISA KEV
  • Would score about 66 if CISA's SSVC rates exploitation active

CVE-2026-122299 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 8.6 (high) and affects dulwich; fixed in 1.2.20.

Published
Last modified
Published
Not listed in CISA KEV
21/100 · provisional
Specific setups only
Fix
Fixed in 1.2.20
None on Exploit-DB, Metasploit or GitHub

Summary

Dulwich, a Python Git library, is affected before version 1.2.20, and Poetry bundles it by default for installing git dependencies. An attacker can remotely, without logging in, craft a commit that makes Poetry's checkout resolve to a malicious tree containing build scripts such as setup.py, leading to code execution on the install or build host, but only if a user takes an action such as installing that dependency.

Read the original description

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.

What to do

  • Check whether your setup matches what the bug needs.

    Dulwich versions before 1.2.20 Poetry 2.5.1 ships this vulnerable dulwich version and uses dulwich by default for git dependency installation The attacker crafts a commit object containing two tree headers
  • Upgrade to a fixed version: 1.2.20.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • jelmer dulwich

    fixed in 1.2.20

Evidence 3

  1. Patch
  2. Report
  3. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-122299

Is CVE-2026-122299 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

Dulwich mishandles commit objects that contain two tree headers. An attacker can use this to get a malicious tree checked out in place of the intended one.Source: vulncheck.com

Which versions are affected by CVE-2026-122299?

dulwich: before 1.2.20.Source: cve.now feed data

Am I affected, and how do I check?

Dulwich versions before 1.2.20 are affected. Poetry 2.5.1 ships a vulnerable Dulwich version and uses Dulwich by default for git dependency installation. To check, run python -c "import dulwich; print(dulwich.__version__)" in the environment where Poetry runs.Source: vulncheck.com

How do I fix CVE-2026-122299?

Upgrade Dulwich to 1.2.20 or later.Source: vulncheck.com