Description
The http_connect function in transports/http.c in libgit2 before 0.24.6 and 0.25.x before 0.25.1 might allow man-in-the-middle attackers to spoof servers by leveraging clobbering of the error variable.
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.25.1+really0.24.6-1 | — |
| Debian 13 | libgit2 | 0.25.1+really0.24.6-1 | — |
| Debian 12 | cargo | 0.17.0-1 | — |
| Debian 12 | libgit2 | 0.25.1+really0.24.6-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | libgit2 | 0.24.1-2ubuntu0.2+esm3 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP2 | libgit2 | 0.24.1-6.1 | SUSE-SU-2017:0433-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.6-10.1 | openSUSE-SU-2017:0405-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libgit2 | 1.1.1-1.2 | openSUSE-SU-2024:10943-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.23 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.22 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.21 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.20 | libgit2 | 0.25.1-r0 | — |
Show 16 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.18 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.17 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.16 | libgit2 +1 | 0.25.1-r0 | — |
| Alpine v3.15 | libgit2 +1 | 0.25.1-r0 | — |
| Alpine v3.14 | libgit2 +1 | 0.25.1-r0 | — |
| Alpine v3.13 | libgit2 +1 | 0.25.1-r0 | — |
| Alpine v3.12 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.11 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.10 | libgit2 +1 | 0.25.1-r0 | — |
| Alpine v3.9 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.8 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.7 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.6 | libgit2 | 0.25.1-r0 | — |
| Alpine v3.5 | libgit2 | 0.24.6-r0 | — |
| Alpine v3.4 | libgit2 | 0.24.6-r0 | — |
Advisories 3
- openSUSE-SU-2017:0405-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10943-1 libgit2-1_1-1.1.1-1.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:0433-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://libgit2.github.com/security/
- [oss-security] 20170110 CVE Request: two security fixes in libgit2 0.25.1, 0.24.6 mailing-list
- [oss-security] 20170110 Re: CVE Request: two security fixes in libgit2 0.25.1, 0.24.6 mailing-list
- 95359 vdb-entry
- https://github.com/libgit2/libgit2/commit/9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
- openSUSE-SU-2017:0397 vendor-advisory
- openSUSE-SU-2017:0405 vendor-advisory
- https://github.com/libgit2/libgit2/commit/b5c6a1b407b7f8b952bded2789593b68b1876211
- openSUSE-SU-2017:0484 vendor-advisory