Dulwich commit parser picks the wrong tree from duplicate headers
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 5 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
Dulwich before 1.2.20 mishandles commit objects that contain two tree headers. Its commit parser resolves a duplicate tree header to the last occurrence instead of the first, which differs from core git (CWE-115). An attacker with no privileges can craft a commit so that reviewers using git see a benign tree, while Poetry 2.5.1, which uses dulwich by default for git dependencies, checks out an attacker-controlled tree containing build scripts such as setup.py. This leads to code execution on the install or build host.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade Dulwich to 1.2.20 or later, the fixed version. Red Hat lists Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat OpenShift AI (RHOAI) and Red Hat OpenShift Container Platform 4 as affected without a fix.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA dulwich (jelmer) Fixed in 1.2.20
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 2 | Affected | — |
| Red Hat Enterprise Linux 7 | Affected | — |
| Red Hat Enterprise Linux 8 | Affected | — |
| Red Hat OpenShift AI (RHOAI) | Affected | — |
| Red Hat OpenShift Container Platform 4 | Affected | — |
Timeline
- 2026-11-04 Threatist record created from CVE-2026-122299
- 2026-11-05 Alias added: GHSA-6jv4-m4h7-2vv8
- 2026-11-06 Priority changed: MEDIUM → LOW
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
More jelmer vulnerabilities
- TI-2026-78707 Path traversal in Dulwich lets attackers write files on Windows CVSS 4.0HIGH 8.7
- TI-2026-37846 Path traversal in jelmer dulwich CVSS 3.1HIGH 7.5
- TI-2026-30843 Dulwich Vulnerable to Command Injection via Merge Driver Path CVSS 4.0HIGH 7.7
- TI-2026-78709 Symlink following in Dulwich checkout allows arbitrary file writes CVSS 4.0HIGH 7.3
- TI-2026-30613 Dulwich has an arbitrary file write via NTFS-hostile tree entries on Windows CVSS 3.1HIGH 8.8
- TI-2026-78708 Infinite recursion in Dulwich pack parsing causes denial of service CVSS 4.0HIGH 7.1
Sources
- CVE-2026-122299 · CVE Program
- CVE-2026-122299 · NVD
- FIRST EPSS
- GHSA-6jv4-m4h7-2vv8 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-122299 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences