CVE-2026-5917
libgit2 versions v0.27.0 through v1.9.0 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.
CSIRTS triage
- What
- Multiple vulnerabilities allow arbitrary command execution on remote SSH servers, credential disclosure, denial of service, and directory creation outside the repository working tree.
- Who is affected
- All deployments of libgit2 using the affected functionality are at risk.
- Urgency
- Urgent; remote code execution on SSH servers is a critical security risk with active exploitation potential.
- Action
- Apply the security update DSA-6453-1 immediately.
AI-assisted analysis generated from the source advisory — verify against the original.
⚡ Watch CVE-2026-5917
Get an email if CVE-2026-5917 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.
Exploitation outlook
- Low exploitation risk0.89% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 57% of all EPSS-scored CVEs.
Advisory coverage (2)
- lowDSA-6453-1 libgit2 - security updatedebian · 2026-08-20
- criticalCVE-2026-5917: libgit2 versions v0.27.0 through v1.9.0 built with the libssh2 SSH backend (USE_SSH=libssh2) co…nvd · 2026-08-11
External references
Embed the live status
— this badge updates automatically when the KEV or exploit status changes. How to embed it →
[](https://www.csirts.com/cve/CVE-2026-5917)