Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.9
CVE-2026-122299: Dulwich before 1.2.20 may load attacker‑controlled code
CVE-2026-122299 · published 1 month ago
Summary
Projects that use Dulwich version earlier than 1.2.20 (for example Poetry 2.5.1) can be tricked into checking out a different set of files than what Git shows. An attacker can hide malicious build scripts in a specially crafted commit, causing those scripts to run when the code is installed or built. Updating Dulwich to version 1.2.20 or later removes the problem.
What to do
- Update jelmer dulwich to version 1.2.20 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| – | jelmer | dulwich | < 1.2.20 |
| Debian:12 | debian | dulwich | All versions |
| Ubuntu:16.04:LTS | canonical | dulwich | All versions |
Original advisory text
Dulwich before 1.2.20 Commit Parser Tree Header Misinterpretation
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.
References
- https://github.com/jelmer/dulwich/releases/tag/dulwich-1.2.20 Third Party Advisory
- https://github.com/jelmer/dulwich/commit/b77f385b4b0d2d2c7f5ac39dae628948f7ad3a9... Third Party Advisory
- https://www.vulncheck.com/advisories/dulwich-before-commit-parser-tree-header-mi... Third Party Advisory
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/122xxx/CVE-2026-1222... Vendor Advisory
- https://github.com/jelmer/dulwich Product
- https://nvd.nist.gov/vuln/detail/CVE-2026-122299 Vendor Advisory
- https://security-tracker.debian.org/tracker/CVE-2026-122299 Vendor Advisory
- https://ubuntu.com/security/CVE-2026-122299 Third Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-122299 Third Party Advisory
Internet-facing
14 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker full control
Severity
9.9
Critical
Type
CWE-1250Improper Preservation of Consistency Between Independent Representations of Shared State
CWE-115Misinterpretation of Input
Timeline
Published4 Nov 2026
Updated2 Dec 2026
First seen4 Nov 2026
Sources
CVE-2026-122299 · NVD
CVE-2026-122299 · MITRE
CVE-2026-122299 · OSV
DEBIAN-CVE-2026-122299 · OSV
UBUNTU-CVE-2026-122299 · OSV
Track software like this
Free during beta