# CVE-2026-122299: Dulwich commit object parsing divergence from git

Source: https://junglewise.ai/threats/cve-2026-122299-dulwich-before-1-2-20-contains-a-commit-object-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-04. Updated: 2026-11-04  
License: CC BY 4.0 with a link back

CVE-2026-122299 · Severity: high · CVSS 8.8 · Published 2026-11-04

Dulwich, a Python implementation of Git, incorrectly resolves duplicate tree headers in commit objects by using the last occurrence instead of the first, diverging from standard git behavior. Poetry uses Dulwich for installing git dependencies; attackers can craft a malicious commit that appears benign when reviewed in standard git but resolves to attacker-controlled code when Poetry checks it out, leading to unreviewed code execution during package installation or build.

Technologies: [Jelmer Dulwich](https://junglewise.ai/threats/technologies/jelmer-dulwich). Vendors: [Jelmer](https://junglewise.ai/threats/vendors/jelmer).

## Quick answers

**Is CVE-2026-122299 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-122299 being exploited in the wild.

**How severe is CVE-2026-122299?** High severity, with a CVSS score of 8.8, published 4 November 2026.

**Which products and versions are affected?** Jelmer Dulwich before 1.2.20; Python Poetry Development Group Poetry 2.5.1.

**Is there a fix for CVE-2026-122299?** Yes: fixed in Dulwich 1.2.20. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-122299 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-122299?** Check whether you run Jelmer Dulwich or Python Poetry Development Group Poetry at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in Dulwich 1.2.20

## Technical details

The vulnerability exists in Dulwich's _parse_commit function, which resolves duplicate tree headers to the last occurrence rather than the first, unlike git's behavior. An attacker can craft a commit object with two tree headers, causing git and code reviewers to see one tree while Dulwich-based tools (like Poetry) resolve to a different attacker-controlled tree. The attack requires crafting a malicious commit object and is exploitable when Poetry uses Dulwich for git dependency resolution.

## Affected products

- Jelmer Dulwich before 1.2.20
- Python Poetry Development Group Poetry 2.5.1

## Timeline

- 2026-11-04: disclosed

## References

- [https://github.com/jelmer/dulwich/commit/b77f385b4b0d2d2c7f5ac39dae628948f7ad3a96](https://github.com/jelmer/dulwich/commit/b77f385b4b0d2d2c7f5ac39dae628948f7ad3a96)
- [https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.20](https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.20)

## Related threats

- [Dulwich path traversal in stash pop via symlinks](https://junglewise.ai/threats/cve-2026-114098-dulwich-from-0-22-5-before-1-2-8-contains-a-path-traversal)
- [Dulwich path traversal in filter_branch CommitFilter](https://junglewise.ai/threats/cve-2026-114097-dulwich-from-0-23-1-before-1-2-8-contains-a-path-traversal)
- [Dulwich symlink following in porcelain.checkout](https://junglewise.ai/threats/cve-2026-114096-dulwich-from-0-24-0-before-1-2-8-contains-a-symlink-following)
- [Dulwich path traversal via DOS drive letter prefixes on Windows](https://junglewise.ai/threats/cve-2026-114094-dulwich-before-1-2-9-fails-to-validate-dos-drive-letter-prefixes)
