Dulwich and Poetry: Arbitrary code execution via commit object parsing (CVE-2026-122299)
Dulwich versions before 1.2.20 contain a parsing vulnerability that causes inconsistent tree header resolution, potentially allowing code execution when used by Poetry 2.5.1.
CVE search metadata
CVE search record: CVE-2026-122299. Severity: high. CVSS: 8.8. KEV: no. Product: Dulwich (< 1.2.20), Poetry (2.5.1). Brief: Dulwich and Poetry: Arbitrary code execution via commit object parsing (CVE-2026-122299). Brief link: https://feed.craftedsignal.io/briefs/2026-11-dulwich-poetry-vulnerability/
Triage facts
Revision 2- Applicability
- Dulwich (< 1.2.20), Poetry (2.5.1)
- Evidence
- Unknown
- Severity
- High
- Sources
- 2 public sources
- Freshness
- Revision 2Nov 5, 00:22 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- A2Roughly even chance
Revision history 1 entry · Revision 2
- Revision 2
poc_available
Changed: claim_state, has_poc, lastmod, poc_references, references, updates
Sources: 1
Dulwich versions prior to 1.2.20 contain a vulnerability in the _parse_commit function where duplicate tree headers are resolved to the last occurrence rather than the first, which diverges from standard Git behavior. Poetry 2.5.1 uses Dulwich by default for git dependency installation. An attacker can craft a commit object with two tree headers so that standard Git clients see a benign tree, while Poetry's dulwich-based checkout resolves to an attacker-controlled tree containing malicious build scripts, such as setup.py, resulting in unreviewed code execution on the install or build host.