CVE-2026-5917

Source
https://cve.org/CVERecord?id=CVE-2026-5917
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5917.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-5917
Aliases
  • GHSA-xqj4-2j5v-rr75
Downstream
Related
Published
2026-08-11T21:40:29Z
Modified
2026-08-28T11:47:28Z
Severity
  • 8.6 (High) CVSS_V4 - 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 CVSS Calculator
Summary
libgit2 Shell Command Injection via ssh_libssh2 Backend
Details

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.

Database specific
{
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
        "CWE-78"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5917.json"
}
References

Affected packages

Git / github.com/libgit2/libgit2

Affected ranges

Type
GIT
Repo
https://github.com/libgit2/libgit2
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Introduced
Fixed
Database specific
Show details
{
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.8.7"
        },
        {
            "introduced": "1.9.0"
        },
        {
            "fixed": "1.9.7"
        }
    ],
    "source": "AFFECTED_FIELD"
}

Affected versions

v0.*
v0.1.0
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.2.0
v0.21.0
v0.22.0
v0.22.0-rc1
v0.22.0-rc2
v0.23.0
v0.23.0-rc1
v0.23.0-rc2
v0.24.0
v0.24.0-rc1
v0.26.0
v0.26.0-rc1
v0.26.0-rc2
v0.27.0
v0.27.0-rc1
v0.27.0-rc2
v0.27.0-rc3
v0.28.0
v0.28.0-rc1
v0.3.0
v0.8.0
v0.99.0
v1.*
v1.0.0
v1.1.0
v1.2.0
v1.3.0
v1.4.0
v1.5.0
v1.6.1
v1.6.2
v1.6.3
v1.7.0
v1.8.0
v1.8.1
v1.8.3
v1.8.4
v1.8.5
v1.8.6
v1.9.0
v1.9.1
v1.9.2
v1.9.3
v1.9.4
v1.9.5
v1.9.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5917.json"