Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jelmer | dulwich | 0.22.5 – < 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.22.5, < 1.2.8 | 1.2.8 | GHSA-cm62-gvxx-vmxx |
References
- GitHub Security Advisory (GHSA-cm62-gvxx-vmxx) vendor-advisory
- VulnCheck Advisory: Dulwich 0.22.5 before 1.2.8 Path Traversal via Stash Pop Symlinks third-party-advisory