
CVE catalog
CVE-2026-5917
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 arbitr
- Severity
- Critical · CVSS 9.4
- Published
- Source
- [NVD] · [CVE record]
- EPSS
- 1.43% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | libgit2 | sid | 1.9.7+ds-1 | fixed |
| Debian | libgit2 | forky | 1.9.7+ds-1 | fixed |
| Debian | libgit2 | trixie | 1.9.0+ds-2+deb13u1 | fixed |
| Debian | libgit2 | trixie-security | 1.9.0+ds-2+deb13u1 | fixed |
| Debian | libgit2 | bookworm | 1.5.1+ds-1+deb12u1 | vulnerable |
| Debian | libgit2 | bookworm-security | 1.5.1+ds-1+deb12u2 | fixed |
| Ubuntu | libgit2 | noble | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2-1.7 | noble | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2-dev | noble | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2-fixtures | noble | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1build1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | fixed |
| Ubuntu | libgit2 | 24.04 | 1.5.1+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.1+ds-2ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu2 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3.1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2 | 26.04 | 1.9.0+ds-2ubuntu2 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1.1 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1.2 | fixed |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1build1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm1 | vulnerable |
| Ubuntu | libgit2 | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | fixed |
| Ubuntu | libgit2 | 24.04 | 1.5.1+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.1+ds-2ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu2 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3.1 | vulnerable |
| Ubuntu | libgit2 | 24.04 | 1.7.2+ds-1ubuntu3.2 | fixed |
| Ubuntu | libgit2 | 26.04 | 1.9.0+ds-2ubuntu2 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1.1 | vulnerable |
| Ubuntu | libgit2 | 26.04 | 1.9.1+ds-1ubuntu1.2 | fixed |
| Opensuse | libgit2 | tumbleweed | 1.9.7-1.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | libgit2 | source | sid | 1.9.7+ds-1 | not yet assigned | Not reported | [1144465] |
| Debian | libgit2 | source | forky | 1.9.7+ds-1 | not yet assigned | Not reported | [1144465] |
| Debian | libgit2 | source | trixie | 1.9.0+ds-2+deb13u1 | not yet assigned | Not reported | [1144465] |
| Debian | libgit2 | source | bookworm | 1.5.1+ds-1+deb12u2 | not yet assigned | Not reported | [1144465] |
| Ubuntu | libgit2 | deb | noble | 1.7.2+ds-1ubuntu3.2 | Not reported | Not reported | Not reported |
| Ubuntu | libgit2-1.7 | deb | noble | 1.7.2+ds-1ubuntu3.2 | Not reported | Not reported | Not reported |
| Ubuntu | libgit2-dev | deb | noble | 1.7.2+ds-1ubuntu3.2 | Not reported | Not reported | Not reported |
| Ubuntu | libgit2-fixtures | deb | noble | 1.7.2+ds-1ubuntu3.2 | Not reported | Not reported | Not reported |
| Ubuntu | libgit2 | deb | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | Not reported | USN-8809-1 | Not reported |
| Ubuntu | libgit2 | deb | 24.04 | 1.7.2+ds-1ubuntu3.2 | Not reported | USN-8809-1 | Not reported |
| Ubuntu | libgit2 | deb | 26.04 | 1.9.1+ds-1ubuntu1.2 | Not reported | USN-8809-1 | Not reported |
| Ubuntu | libgit2 | deb | pro | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | Not reported | UBUNTU-CVE-2026-5917 | Not reported |
| Ubuntu | libgit2 | deb | 24.04 | 1.7.2+ds-1ubuntu3.2 | Not reported | UBUNTU-CVE-2026-5917 | Not reported |
| Ubuntu | libgit2 | deb | 26.04 | 1.9.1+ds-1ubuntu1.2 | Not reported | UBUNTU-CVE-2026-5917 | Not reported |
| Opensuse | libgit2 | rpm | tumbleweed | 1.9.7-1.1 | Not reported | OPENSUSE-SU-2026:11521-1 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [libgit2-1.5]Affected
Source package: [libgit2]
Details (4)
1.5.1+ds-1+deb12u1· amd64 · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· arm64 · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· amd64 · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· arm64 · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
- [libgit2-dev]Affected
Source package: [libgit2]
Details (6)
1.5.1+ds-1+deb12u1· amd64 · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· arm64 · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.8.4+ds-3~bpo12+1· amd64 · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.8.4+ds-3~bpo12+1· arm64 · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· amd64 · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· arm64 · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
- [libgit2-fixtures]Affected
Source package: [libgit2]
Details (6)
1.5.1+ds-1+deb12u1· all · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· all · bookwormAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.8.4+ds-3~bpo12+1· all · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.8.4+ds-3~bpo12+1· all · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· all · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.5.1+ds-1+deb12u1· all · bookworm-securityAffected · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
- [libgit2-1.8]Fixed
Source package: [libgit2]
Details (2)
1.8.4+ds-3~bpo12+1· amd64 · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
1.8.4+ds-3~bpo12+1· arm64 · bookworm-backportsFixed · Fixed:
1.5.1+ds-1+deb12u2nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12
[Debian 13 (Trixie)]
- [libgit2-1.9]Affected
Source package: [libgit2]
Details (4)
1.9.0+ds-2· amd64 · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2· arm64 · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· amd64 · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· arm64 · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
- [libgit2-dev]Affected
Source package: [libgit2]
Details (4)
1.9.0+ds-2· amd64 · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2· arm64 · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· amd64 · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· arm64 · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
- [libgit2-fixtures]Affected
Source package: [libgit2]
Details (4)
1.9.0+ds-2· all · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2· all · trixieAffected · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· all · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
1.9.0+ds-2+deb13u1· all · trixie-securityFixed · Fixed:
1.9.0+ds-2+deb13u1nvd · libgit2 · debian · 13
[openSUSE Tumbleweed]
- [libgit2-1_9]Unknown
Source package: [libgit2]
Details (1)
1.9.7-1.1· x86_64 · tumbleweedUnknown · Fixed:
1.9.7-1.1Version impact unknown
nvd · libgit2 · opensuse · tumbleweed
- [libgit2-devel]Unknown
Source package: [libgit2]
Details (1)
1.9.7-1.1· x86_64 · tumbleweedUnknown · Fixed:
1.9.7-1.1Version impact unknown
nvd · libgit2 · opensuse · tumbleweed
- [libgit2-tools]Unknown
Source package: [libgit2]
Details (1)
1.9.7-1.1· x86_64 · tumbleweedUnknown · Fixed:
1.9.7-1.1Version impact unknown
nvd · libgit2 · opensuse · tumbleweed
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2026_11521-1.json]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-5917]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-5917]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2026-5917]
- [https://osv.dev/vulnerability/USN-8809-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2026:11521-1]
- [https://security-tracker.debian.org/tracker/CVE-2026-5917]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-5917.json]
- [https://ubuntu.com/security/notices/USN-8809-1]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX] · [Ubuntu Security Notices (USN)]