{"id":"CVE-2026-5917","aliases":["CVE-2026-5917"],"related":[],"kind":"vulnerability","state":"published","title":"libgit2 Shell Command Injection via ssh_libssh2 Backend","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"}],"published":"2026-08-11T21:40:29.078Z","modified":"2026-10-01T15:20:07.878Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"1.8.7","status":"affected"},{"type":"semver","introduced":"1.9.0","fixed":"1.9.7","status":"affected"}],"vendor":"libgit2","product":"libgit2","source":"cvelist"}],"references":[{"url":"https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75","tags":["patch","vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Kazuma Matsumoto, a security researcher at GMO Cybersecurity by IERAE, Inc.","Isabel Mill"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-12T12:48:11.019Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-5917","url":"https://www.cve.org/CVERecord?id=CVE-2026-5917","licence":"CVE Terms of Use","modified":"2026-10-01T15:20:07.878Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-5917","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5917","licence":"Public domain","modified":"2026-09-24T20:43:32.537Z"}],"updatedAt":"2026-11-25T22:59:32.523Z","epss":{"score":0.00873,"percentile":0.59976,"date":"2026-12-01T12:00:22.000Z"}}