Poetry: Dulwich: Infinite Loop Denial of Service (DoS) in Packfile Object Resolution
Description
A denial of service (DoS) vulnerability exists in the dulwich library's Pack.resolve_object method. When resolving an OFS_DELTA object with a delta_offset of zero, the method enters an infinite recursive loop due to self-referential offset calculation. This causes CPU exhaustion and process crashes in applications using dulwich for Git packfile operations. The vulnerability affects dulwich versions >=1.2.0 and <2.4.2. A patch is available to explicitly reject delta_offset == 0 and prevent infinite recursion.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in dulwich's Pack.resolve_object method arises when resolving OFS_DELTA objects. The base offset is calculated as obj_offset - delta_offset. If delta_offset is zero, this calculation results in the base offset being the same as the current object's offset, causing infinite recursion without a depth limit or cycle detection. This leads to CPU exhaustion and denial of service in any operation that processes packfiles, such as cloning or fetching repositories. The issue violates Git packfile specifications, which disallow delta_offset of zero. A proof-of-concept demonstrates the infinite loop triggered by a crafted packfile. The recommended fix is to add an explicit check rejecting delta_offset == 0 and to implement recursion depth limits.
Potential Impact
An attacker can cause any dulwich-based service or tool to enter an infinite loop consuming 100% CPU by providing a malicious packfile with an OFS_DELTA object having delta_offset of zero. This results in denial of service by hanging or crashing processes that perform packfile operations such as cloning, fetching, or object lookups. There is no impact on confidentiality or integrity, but availability is severely affected.
Mitigation Recommendations
A patch is available that adds an explicit check in Pack.resolve_object to reject delta_offset values of zero, preventing infinite recursion. Additionally, implementing a recursion depth limit can mitigate long delta chains. Users should upgrade dulwich to a fixed version >=2.4.2 or apply the patch provided by the vendor. No other mitigation is required once patched.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-poetry-GHSA-35mr-4567-66vg
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6ac2457d12601ec6a3164060
Added to database: 10/04/2026, 12:24:29 UTC
Last enriched: 10/04/2026, 12:28:44 UTC
Last updated: 10/04/2026, 12:28:44 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.