Dulwichの脆弱性により、コミットの解釈差を悪用され未確認のコードを実行される恐れ
Summary
Dulwichの1.2.20より前のバージョンには、ツリーヘッダーが重複したコミットを読み込む際、Gitと異なる方のヘッダーを採用してしまう脆弱性があります。Poetry 2.5.1に同梱されるDulwichも影響を受け、インストールやビルドの際に、確認されていない悪意のあるスクリプトが実行されるおそれがあります。修正版の1.2.20が公開されているため、Dulwichを1.2.20以降に更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Dulwichの1.2.20より前のバージョンには、ツリーヘッダーが重複したコミットを読み込む際、Gitと異なる方のヘッダーを採用してしまう脆弱性があります。Poetry 2.5.1に同梱されるDulwichも影響を受け、インストールやビルドの際に、確認されていない悪意のあるスクリプトが実行されるおそれがあります。修正版の1.2.20が公開されているため、Dulwichを1.2.20以降に更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| jelmerdulwich |
< 1.2.20→ 1.2.20 |
1.2.20 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-122299 dulwich No fixed version in this record
- Ubuntu UBUNTU-CVE-2026-122299 dulwich No fixed version in this record
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory vulncheck.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com