{"id":"CVE-2026-5917","published":"2026-08-11T21:40:29Z","modified":"2026-10-01T15:20:07Z","title":"libgit2 Shell Command Injection via ssh_libssh2 Backend","vendor":"libgit2","product":"libgit2","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01427,"percentile":0.7362,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75","tags":["vendor-advisory","patch"]},{"url":"https://www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend","tags":["third-party-advisory"]}],"priority":{"score":20.9,"factors":[{"name":"EPSS percentile","points":14.72},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"libgit2","affectedVersions":[{"vendor":"libgit2","product":"libgit2","versions":["< 1.8.7",">= 1.9.0, < 1.9.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-12T12:48:11.019321Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-57011","exploited":false,"provenance":"source"}}