CVE-2026-5917

EUVD-2026-57011
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.
OS Command Injection
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
VulnCheckCNA
8.8 HIGH
NETWORK
LOW
NONE
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 71.84%
Early Detection
Affected products identified ahead of NVD analysis through intelligence sources.
VendorProductVersionSource
libgit2libgit2
𝑥
< 1.8.7
CNA
libgit2libgit2
1.9.0 ≤
𝑥
< 1.9.7
CNA
Debian logo
Debian Releases
Debian Product
Codename
libgit2
bookworm
vulnerable
bookworm (security)
vulnerable
forky
1.9.7+ds-1
fixed
sid
1.9.7+ds-1
fixed
trixie
1.9.0+ds-2+deb13u1
fixed
trixie (security)
1.9.0+ds-2+deb13u1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
libgit2
bionic
Fixed 0.26.0+dfsg.1-1.1ubuntu0.2+esm3
released
focal
Fixed 0.28.4+dfsg.1-2ubuntu0.1+esm2
released
jammy
Fixed 1.1.0+dfsg.1-4.1ubuntu0.1+esm2
released
noble
Fixed 1.7.2+ds-1ubuntu3.2
released
resolute
Fixed 1.9.1+ds-1ubuntu1.2
released
trusty
not-affected
xenial
Fixed 0.24.1-2ubuntu0.2+esm4
released
Amazon Linux logo
Amazon Linux Releases
Amazon Package
Release
cargo-c
Amazon Linux 2023
0:0.10.21-1.amzn2023.0.2
fixed
cargo-c-debuginfo
Amazon Linux 2023
0:0.10.21-1.amzn2023.0.2
fixed
libgit2
Amazon Linux 2023
0:1.6.4-116.amzn2023
fixed
libgit2-debuginfo
Amazon Linux 2023
0:1.6.4-116.amzn2023
fixed
libgit2-debugsource
Amazon Linux 2023
0:1.6.4-116.amzn2023
fixed
libgit2-devel
Amazon Linux 2023
0:1.6.4-116.amzn2023
fixed
rust-cargo-c-debugsource
Amazon Linux 2023
0:0.10.21-1.amzn2023.0.2
fixed