CVE-2026-5917
published high CVSS 4.0 · 8.6libgit2 Shell Command Injection via ssh_libssh2 Backend
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| libgit2 | — | libgit20 to < 1.8.7 · 1.9.0 to < 1.9.7 · Other versions: affected | Affected | Not stated | VulnCheck |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-2083 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2026-2113 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | libgit2 | Fixed | 1.9.7-r0 | Package fix record |
| Debian | bookworm | libgit2 | Advisory build | 1.5.1+ds-1+deb12u2 | DLA-4831-1 |
| Ubuntu | bionic | libgit2 | Advisory build | 0.26.0+dfsg.1-1.1ubuntu0.2+esm3 | USN-8809-1 |
Show 35 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_9aarch64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| Amazon Linux | AL2023 | libgit2aarch64 | Listed in advisory | Not stated | ALAS2023-2026-2083 |
| Alpine Linux | v3.23 | libgit2 | Fixed | 1.9.7-r0 | Package fix record |
| Alpine Linux | v3.24 | libgit2 | Fixed | 1.9.7-r0 | Package fix record |
| Debian | trixie | libgit2 | Advisory build | 1.9.0+ds-2+deb13u1 | DSA-6453-1 |
| Ubuntu | focal | libgit2 | Advisory build | 0.28.4+dfsg.1-2ubuntu0.1+esm2 | USN-8809-1 |
| Ubuntu | jammy | libgit2 | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | USN-8809-1 |
| Ubuntu | noble | libgit2 | Advisory build | 1.7.2+ds-1ubuntu3.2 | USN-8809-1 |
| Ubuntu | resolute | libgit2 | Advisory build | 1.9.1+ds-1ubuntu1.2 | USN-8809-1 |
| Ubuntu | xenial | libgit2 | Advisory build | 0.24.1-2ubuntu0.2+esm4 | USN-8809-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_9ppc64le | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_9s390x | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-1_9x86_64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develaarch64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develppc64le | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-devels390x | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-develx86_64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsaarch64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsppc64le | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolss390x | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libgit2-toolsx86_64 | Advisory build | 1.9.7-1.1 | OPENSUSE-SU-2026:11521-1 |
| Ubuntu | bionic | libgit2-26 | Advisory build | 0.26.0+dfsg.1-1.1ubuntu0.2+esm3 | USN-8809-1 |
| Ubuntu | focal | libgit2-28 | Advisory build | 0.28.4+dfsg.1-2ubuntu0.1+esm2 | USN-8809-1 |
| Ubuntu | jammy | libgit2-1.1 | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | USN-8809-1 |
| Ubuntu | jammy | libgit2-fixtures | Advisory build | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | USN-8809-1 |
| Ubuntu | noble | libgit2-1.7 | Advisory build | 1.7.2+ds-1ubuntu3.2 | USN-8809-1 |
| Ubuntu | noble | libgit2-fixtures | Advisory build | 1.7.2+ds-1ubuntu3.2 | USN-8809-1 |
| Ubuntu | resolute | libgit2-1.9 | Advisory build | 1.9.1+ds-1ubuntu1.2 | USN-8809-1 |
| Ubuntu | resolute | libgit2-fixtures | Advisory build | 1.9.1+ds-1ubuntu1.2 | USN-8809-1 |
| Ubuntu | xenial | libgit2-24 | Advisory build | 0.24.1-2ubuntu0.2+esm4 | USN-8809-1 |
| Amazon Linux | AL2023 | libgit2src | Listed in advisory | Not stated | ALAS2023-2026-2083 |
| Amazon Linux | AL2023 | libgit2x86_64 | Listed in advisory | Not stated | ALAS2023-2026-2083 |
| Amazon Linux | AL2023 | rust-cargo-caarch64 | Listed in advisory | Not stated | ALAS2023-2026-2113 |
| Amazon Linux | AL2023 | rust-cargo-csrc | Listed in advisory | Not stated | ALAS2023-2026-2113 |
| Amazon Linux | AL2023 | rust-cargo-cx86_64 | Listed in advisory | Not stated | ALAS2023-2026-2113 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.6 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| libgit2 | libgit2 | 0 to < 1.8.7 (affected · custom)1.9.0 to < 1.9.7 (affected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
2- GitHub Security Advisory (GHSA-xqj4-2j5v-rr75) https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75
- https://www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend
Provider assertions
2VulnCheck · cna
libgit2 Shell Command Injection via ssh_libssh2 Backend
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 52476f6204c2e01feb2a9a31abac513a5eb0a7c7bed1d09aa9de874cfb07ab7c
- Ingested
- 01 Oct 2026, 18:31:22 UTC
- Source record
- Official CVE record