CVE-2026-122299 Details
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.
A vulnerability in Dulwich versions prior to 1.2.20 allows for improper parsing of commit objects. The issue arises because the parsing function '_parse_commit' resolves duplicate tree headers incorrectly, favoring the last occurrence instead of the first. This behavior deviates from core Git's handling of such headers. The vulnerability is particularly concerning because it can be exploited in environments where Dulwich is used for Git dependency management, such as with Poetry version 2.5.1. Attackers can craft commit objects with multiple tree headers, creating a scenario where continuous integration (CI) systems see a harmless tree, while the version of Dulwich used by Poetry accesses a different, maliciously controlled tree. This tree could contain harmful build scripts, like 'setup.py', leading to unauthorized code execution on the host where the installation or build occurs.
Users can upgrade to Dulwich version 1.2.20 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Nov 4, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-115 | Misinterpretation of Input | [email protected] |
| CWE-1250 | Improper Preservation of Consistency Between Independent Representations of Shared State | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Dulwich | < 1.2.20 (semver) |
CPE
Remediation
| |
| Poetry | All versions |
CPE
Remediation
| |
Change History
1 change record found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 4, 2026 | New CVE Received | [email protected] |
Volerion