Description
Dulwich from 0.23.1 before 1.2.8 contains a path traversal vulnerability in CommitFilter._apply_index_filter() 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 filter_branch, enabling code execution by writing into .git/hooks.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jelmer | dulwich | 0.23.1 – < 1.2.8 | 1.2.8 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | dulwich | 1.2.8-1 | — |
| Debian 13 | dulwich | No fix yet | — |
| Debian 12 | dulwich | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | dulwich | No fix yet | — |
| Ubuntu 24.04 LTS | dulwich | No fix yet | — |
| Ubuntu 22.04 LTS | dulwich | No fix yet | — |
| Ubuntu 20.04 LTS | dulwich | No fix yet | — |
| Ubuntu 18.04 LTS | dulwich | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | dulwich | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | dulwich | >= 0.23.1, < 1.2.8 | 1.2.8 | GHSA-5fqc-mrg8-w798 |
References
- GitHub Security Advisory (GHSA-5fqc-mrg8-w798) vendor-advisory
- VulnCheck Advisory: Dulwich 0.23.1 before 1.2.8 Symlink Path Traversal via filter_branch Index Filter third-party-advisory