Description
In ng_pkt in transports/smart_pkt.c in libgit2 before 0.26.6 and 0.27.x before 0.27.4, a remote attacker can send a crafted smart-protocol "ng" packet that lacks a '\0' byte to trigger an out-of-bounds read that leads to DoS.
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.27.4+dfsg.1-0.1 | — |
| Debian 13 | libgit2 | 0.27.4+dfsg.1-0.1 | — |
| Debian 12 | libgit2 | 0.27.4+dfsg.1-0.1 | — |
| Debian 9 | libgit2 | 0.25.1+really0.24.6-1+deb9u1 | DLA-2936-1 |
| Debian 8 | libgit2 | 0.21.1-3+deb8u1 | DLA-1477-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | libgit2 | 0.26.0+dfsg.1-1.1ubuntu0.2+esm2 | — |
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm3 | — |
| Ubuntu Pro 14.04 LTS | libgit2 | 0.19.0-2ubuntu0.4+esm2 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 | libgit2 | 0.26.6-3.5.2 | SUSE-SU-2018:2469-1 |
| SLES 12 SP3 | libgit2 | 0.24.1-7.6.1 | SUSE-SU-2018:3440-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Manager Server 3.2 | libgit2 | 0.24.1-7.6.1 | SUSE-SU-2018:3440-1 |
| SUSE Manager Server 3.1 | libgit2 | 0.24.1-7.6.1 | SUSE-SU-2018:3440-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.23 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.22 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.21 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.20 | libgit2 | 0.27.4-r0 | — |
Show 11 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.18 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.17 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.16 | libgit2 +1 | 0.27.4-r0 | — |
| Alpine v3.15 | libgit2 +1 | 0.27.4-r0 | — |
| Alpine v3.14 | libgit2 +1 | 0.27.4-r0 | — |
| Alpine v3.13 | libgit2 +1 | 0.27.4-r0 | — |
| Alpine v3.12 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.11 | libgit2 | 0.27.4-r0 | — |
| Alpine v3.10 | libgit2 +1 | 0.27.4-r0 | — |
| Alpine v3.9 | libgit2 | 0.27.4-r0 | — |
Advisories 4
- DLA-2936-1 libgit2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1477-1 libgit2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2018:3440-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:2469-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9406
- https://github.com/libgit2/libgit2/releases/tag/v0.27.4
- https://www.pro-linux.de/sicherheit/2/44650/denial-of-service-in-libgit2.html
- https://bugzilla.suse.com/show_bug.cgi?id=1104641
- [debian-lts-announce] 20180825 [SECURITY] [DLA 1477-1] libgit2 security update mailing-list
- https://github.com/libgit2/libgit2/releases/tag/v0.26.6
- https://github.com/libgit2/libgit2/commit/1f9a8510e1d2f20ed7334eeeddb92c4dd8e7c649
- [debian-lts-announce] 20220321 [SECURITY] [DLA 2936-1] libgit2 security update mailing-list