Description
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 O_NOFOLLOW. 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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jelmer | dulwich | 0.24.0 – < 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.24.0, < 1.2.8 | 1.2.8 | GHSA-8w8g-wq8h-fq33 |
References
- GitHub Security Advisory (GHSA-8w8g-wq8h-fq33) vendor-advisory
- VulnCheck Advisory: Dulwich 0.24.0 before 1.2.8 Symlink Write-Through via porcelain.checkout paths third-party-advisory