CVE-2026-5917: libgit2 Shell Command Injection via ssh_libssh2 Backend
Vulnerability summary
CVE-2026-5917 is a high (CVSS 8.8) vulnerability in libgit2. EPSS estimates a 0.87% chance of exploitation in the next 30 days, higher than 60.1% of scored vulnerabilities.
Not severe (CVSS 8.6, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3Timeline
- 11-08-2026PublishedVulnerability first disclosed.
- 01-10-2026Last modifiedVulnerability information updated.
Description
libgit2 versions before 1.8.7 and 1.9.0 before 1.9.7 built with the libssh2 SSH backend (USE_SSH=libssh2) contain a shell command injection vulnerability that allows remote attackers to execute arbitrary commands on an SSH server by supplying a repository path containing unescaped shell metacharacters such as single quotes, semicolons, or pipes. The gen_proto() function in ssh_libssh2.c inserts the repository path directly into a shell command string without escaping special characters before passing it to libssh2_channel_exec(), enabling an attacker to craft a malicious submodule URL in a .gitmodules file that, when processed during a recursive clone, causes the remote server's shell to interpret injected commands under the victim's SSH user account.
CVSS metrics
8 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated8.6HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- NVDNIST8.6HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- NVDNIST8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.87%
Chance of exploitation in the next 30 days
Percentile
60%
Versus all other CVEs
30-day change
Decrease -0.55 pp
From 1.43% on 05-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- libgit2< 1.9.7-r0
Debian1 product
- libgit2All versions (No fix recorded) | < 1.5.1+ds-1+deb12u2 | < 1.9.0+ds-2+deb13u1 | < 1.9.7+ds-1
Libgit21 product
- libgit2< 1.8.7 | ≥ 1.9.0, < 1.9.7
Opensuse1 product
- libgit2&distro=openSUSE Tumbleweed< 1.9.7-1.1
Ubuntu1 product
- libgit2< 0.24.1-2ubuntu0.2+esm4 | < 0.26.0+dfsg.1-1.1ubuntu0.2+esm3 | < 0.28.4+dfsg.1-2ubuntu0.1+esm2 | < 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | < 1.7.2+ds-1ubuntu3.2 | < 1.9.1+ds-1ubuntu1.2
5 vendors · 5 products
References
9 links- www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backendThird Party AdvisoryREPORT