Dulwich before 1.2.20 Commit Parser Tree Header Misinterpretation

State
Published
Severity
8.6 High
Published
Nov 4, 2026
Updated
Nov 9, 2026
Reserved
Nov 4, 2026

Read the record on cve.org

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.

ProductVersions
dulwich jelmerbefore 1.2.20 Affected

Weaknesses

  • CWE-1250 Improper Preservation of Consistency Between Independent Representations of Shared State
  • CWE-115 Misinterpretation of Input

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.