Description
An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0. path.c mishandles equivalent filenames that exist because of NTFS Alternate Data Streams. This may allow remote code execution when cloning a repository. This issue is similar to CVE-2019-1352.
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 | libgit2 | 0.28.4+dfsg.1-2 | — |
| Debian 13 | libgit2 | 0.28.4+dfsg.1-2 | — |
| Debian 12 | libgit2 | 0.28.4+dfsg.1-2 | — |
| Debian 10 | libgit2 | 0.27.7+dfsg.1-0.2+deb10u1 | DLA-3340-1 |
| Debian 9 | libgit2 | 0.25.1+really0.24.6-1+deb9u1 | DLA-2936-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | libgit2 | 1.1.0+dfsg.1-4.1ubuntu0.1 | USN-6678-1 |
| Ubuntu 20.04 LTS | libgit2 | 0.28.4+dfsg.1-2ubuntu0.1 | USN-6678-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | libgit2 | 0.26.0+dfsg.1-1.1ubuntu0.2+esm1 | USN-6678-1 |
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm2 | USN-6678-1 |
| Ubuntu Pro 14.04 LTS | libgit2 | No fix yet | — |
Advisories 3
- USN-6678-1 libgit2 vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-2936-1 libgit2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3340-1 libgit2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/git/git/security/advisories/GHSA-5wph-8frv-58vj
- https://github.com/libgit2/libgit2/releases/tag/v0.99.0
- https://github.com/libgit2/libgit2/releases/tag/v0.28.4
- https://github.com/libgit2/libgit2/commit/3f7851eadca36a99627ad78cbe56a40d3776ed01
- https://github.com/libgit2/libgit2/commit/e1832eb20a7089f6383cfce474f213157f5300cb
- [debian-lts-announce] 20220321 [SECURITY] [DLA 2936-1] libgit2 security update mailing-list
- [debian-lts-announce] 20230223 [SECURITY] [DLA 3340-1] libgit2 security update mailing-list