# CVE-2026-5917: libgit2 Shell Command Injection via ssh\_libssh2 Backend

- Priority: **Routine**
- Reason: Not severe (CVSS 8.6, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-11 · Modified: 2026-10-01
- Aliases: UBUNTU-CVE-2026-5917, USN-8809-1, DEBIAN-CVE-2026-5917, openSUSE-SU-2026:11521-1, ALPINE-CVE-2026-5917
- Record: https://cvemate.com/vulnerability/CVE-2026-5917 · JSON: https://cvemate.com/vulnerability/CVE-2026-5917/json

## 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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.873%, percentile 60.19%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine libgit2 (Alpine Linux): \< 1.9.7-r0
- debian libgit2 (Debian): All versions (No fix recorded) \| \< 1.5.1+ds-1+deb12u2 \| \< 1.9.0+ds-2+deb13u1 \| \< 1.9.7+ds-1
- ubuntu libgit2 (Ubuntu): \< 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
- libgit2 libgit2: \< 1.8.7 \| ≥ 1.9.0, \< 1.9.7
- opensuse libgit2&distro=openSUSE Tumbleweed (openSUSE): \< 1.9.7-1.1

## References

- <https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75>
- <https://www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend>
- <https://ubuntu.com/security/CVE-2026-5917>
- <https://www.cve.org/CVERecord?id=CVE-2026-5917>
- <https://github.com/libgit2/libgit2>
- <https://ubuntu.com/security/notices/USN-8809-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-5917>
- <https://www.suse.com/security/cve/CVE-2026-5917>
- <https://security.alpinelinux.org/vuln/CVE-2026-5917>

---

Data as of 2026-12-05T18:21:54.453Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
