CVE-2026-5917 json
libgit2 Shell Command Injection via ssh_libssh2 Backend
published 2026-08-11 2 mo ago modified 2026-10-01 38 d ago also EUVD-2026-57011 , GHSA-3gwr-xcwq-7892 , JLSEC-2026-1275
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
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.
Patch / fix
- julia LibGit2_jll 1.9.1+0
- libgit2 libgit2 1.8.7, 1.9.7
- libgit2 Debian 12 1.5.1+ds-1+deb12u2
- libgit2 Debian 13 1.9.0+ds-2+deb13u1
- libgit2 Debian 14 1.9.7+ds-1
debian advisories DEBIAN-CVE-2026-5917
- libgit2 Ubuntu 24.04 LTS 1.7.2+ds-1ubuntu3.2
- libgit2 Ubuntu 26.04 LTS 1.9.1+ds-1ubuntu1.2
- libgit2 Ubuntu Pro 16.04 LTS 0.24.1-2ubuntu0.2+esm4
- libgit2 Ubuntu Pro 18.04 LTS 0.26.0+dfsg.1-1.1ubuntu0.2+esm3
- libgit2 Ubuntu Pro 20.04 LTS 0.28.4+dfsg.1-2ubuntu0.1+esm2
- libgit2 Ubuntu Pro 22.04 LTS 1.1.0+dfsg.1-4.1ubuntu0.1+esm2
ubuntu advisories UBUNTU-CVE-2026-5917
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libgit2 openSUSE Tumbleweed 1.9.7-1.1
opensuse advisories openSUSE-SU-2026:11521-1
- libgit2 Alpine 3.24, Alpine 3.23 1.9.7-r0
alpine advisories ALPINE-CVE-2026-5917
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-5917 updated cvss 8.8
libgit2: libgit2: Arbitrary code execution via shell command injection in SSH backend
-
Red Hat Enterprise Linux AI (RHEL AI) 3 libgit2affected: workaround, no fix available
-
Red Hat Enterprise Linux 8 libgit2 Red Hat Enterprise Linux 9 rust, cargo, clippy, rustfmt, rust-gdb, rust-src, +8 more Red Hat Enterprise Linux 10 rust Red Hat Enterprise Linux AI (RHEL AI) 3 rust Red Hat Hardened Images libgit2not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 mo ago
Exploit prediction
1.43% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.6 | 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 |
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.6 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| julia | LibGit2_jll | <1.9.1+0 |
1.9.1+0 |
Affected products
- libgit2 libgit2
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
github.com
/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75
vendor-advisory, patch
-
vulncheck.com
/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend
third-party-advisory, web
-
github.com
/advisories/GHSA-3gwr-xcwq-7892
web
-
github.com
/libgit2/libgit2
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-5917
web
Sources
- CVE List CVE-2026-5917
- NVD CVE-2026-5917
- OSV JLSEC-2026-1275
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.