MGASA-2026-0589: Updated python-dulwich & rust-similar3 packages fixes security vulnerabilities
Commit subjects not sanitized in porcelain.formatpatch Unbounded memory allocation in receive-pack from crafted thin packs Dulwich from 0.22.5 before 1.2.8 contains a path traversal vulnerability in stash.py pop() that allows attackers to write arbitrary files outside the worktree through intermediate directory symlinks. Attackers can craft a malicious repository whose popped stash writes a payload into .git/hooks/post-checkout, achieving code execution on the next checkout. Dulwich from 0.23.1 before 1.2.8 contains a path traversal vulnerability in CommitFilter.applyindexfilter() that allows attackers to write files outside the working directory via symlinks persisting between commits. Attackers can craft a repository where an ancestor commit's symlink redirects a descendant commit's file writes during filterbranch, enabling code execution by writing into .git/hooks. Dulwich before 1.2.9 contains a denial of service vulnerability in Pack.resolveobject that allows attackers to cause infinite recursion via self-referential OFSDELTA objects. Attackers can supply a malicious packfile with an OFSDELTA deltaoffset of 0 to exhaust CPU during clone, fetch, or cat-file operations. Dulwich before 1.2.9 fails to validate DOS drive letter prefixes in Git tree path elements on Windows, allowing arbitrary file write. Attackers can craft a malicious repository with a tree entry named 'C:' that bypasses NTFS validation and writes files outside the worktree to achieve remote code execution. Dulwich from 0.24.0 before 1.2.8 contains a symlink following vulnerability in porcelain.checkout(paths=[...]) that allows attackers to write arbitrary files by abusing raw os.open without ONOFOLLOW. Attackers can craft a repository where a worktree symlink points to .git/hooks/post-checkout, so restoring the file from a tag writes a malicious hook for code execution.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
mageia/python-dulwichto a version that resolves this vulnerability.Fixed in 1.2.21-1.1.mga10 - Upgrade
Upgrade
mageia/rust-similar3to a version that resolves this vulnerability.Fixed in 3.1.1-1.mga10 - Upgrade
Upgrade
python-dulwichto a version that resolves this vulnerability.Fixed in 1.2.9
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which operations can be triggered by a malicious repository or packfile?
Popping a stash can write through intermediate directory symlinks, and filter_branch can follow a symlink left by an ancestor commit when applying a descendant commit. Clone, fetch, and cat-file operations can process a malicious self-referential OFS_DELTA object that causes infinite recursion.
How could the path traversal issues lead to code execution?
A malicious repository can cause writes outside the worktree, including into .git/hooks/post-checkout during stash pop. A subsequent checkout can then execute the written hook; the filter_branch issue can likewise write into .git/hooks through persistent symlinks between commits.
Which Dulwich version ranges are identified for the path traversal issues?
The stash.py pop() issue affects Dulwich from 0.22.5 before 1.2.8. The CommitFilter._apply_index_filter() issue affects Dulwich from 0.23.1 before 1.2.8; the Pack.resolve_object denial of service affects versions before 1.2.9.
What is the impact of the crafted thin-pack issue?
The advisory identifies unbounded memory allocation in receive-pack when processing crafted thin packs. The provided information does not specify affected versions or additional prerequisites for that issue.