Improper Preservation of Consistency Between Independent Representations of Shared State Affecting dulwich package, versions [,1.2.20)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.33% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-DULWICH-22220108
  • published5 Nov 2026
  • disclosed5 Nov 2026
  • creditIsabel Mill

Introduced: 5 Nov 2026

NewCVE-2026-122299  (opens in a new tab)
CWE-1250  (opens in a new tab)

How to fix?

Upgrade dulwich to version 1.2.20 or higher.

Overview

Affected versions of this package are vulnerable to Improper Preservation of Consistency Between Independent Representations of Shared State via _parse_commit in dulwich/objects.py, which resolves a duplicate tree header in a commit object to the last occurrence rather than the first, diverging from core git's behavior. An attacker can craft a commit object containing two tree headers so that reviewers and CI systems using git see a benign tree, while a 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.

CVSS Base Scores

version 4.0
version 3.1