Description
The git_oid_nfmt function in commit.c in libgit2 before 0.24.3 allows remote attackers to cause a denial of service (NULL pointer dereference) via a cat-file command with a crafted object file.
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.24.2-2 | — |
| Debian 13 | libgit2 | 0.24.2-2 | — |
| Debian 12 | cargo | 0.17.0-1 | — |
| Debian 12 | libgit2 | 0.24.2-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm1 | USN-4798-1 |
| Ubuntu Pro 14.04 LTS | libgit2 | 0.19.0-2ubuntu0.4+esm1 | USN-4798-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP2 | libgit2 | 0.24.1-3.1 | SUSE-SU-2016:2969-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 12 SP1 | libgit2 | 0.24.3-6.1 | openSUSE-SU-2017:0195-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libgit2 | 0.24.3-1.1 | openSUSE-SU-2024:10249-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.23 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.22 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.21 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.20 | libgit2 | 0.24.3-r0 | — |
Show 15 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.18 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.17 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.16 | libgit2 +1 | 0.24.3-r0 | — |
| Alpine v3.15 | libgit2 +1 | 0.24.3-r0 | — |
| Alpine v3.14 | libgit2 +1 | 0.24.3-r0 | — |
| Alpine v3.13 | libgit2 +1 | 0.24.3-r0 | — |
| Alpine v3.12 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.11 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.10 | libgit2 +1 | 0.24.3-r0 | — |
| Alpine v3.9 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.8 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.7 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.6 | libgit2 | 0.24.3-r0 | — |
| Alpine v3.5 | libgit2 | 0.24.3-r0 | — |
Advisories 4
- USN-4798-1 libgit2 vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- SUSE-SU-2016:2969-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2017:0195-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10249-1 libgit2-24-0.24.3-1.1 on GA media SUSE / openSUSE Security Updates · May 7, 2025
References
- https://bugzilla.redhat.com/show_bug.cgi?id=1383211
- FEDORA-2016-616a35205b vendor-advisory
- 93465 vdb-entry
- [oss-security] 20161008 Re: CVE request: invalid memory accesses parsing object files in libgit2 mailing-list
- https://github.com/libgit2/libgit2/issues/3937
- https://github.com/libgit2/libgit2/releases/tag/v0.24.3
- openSUSE-SU-2016:3097 vendor-advisory
- FEDORA-2016-505d7fe198 vendor-advisory
- openSUSE-SU-2017:0208 vendor-advisory
- openSUSE-SU-2017:0195 vendor-advisory
- openSUSE-SU-2017:0184 vendor-advisory
- FEDORA-2016-bc51f4636f vendor-advisory