PoC Monitor
← All CVEs
CVE-2026-5917published 11 Aug 2026 21:40 UTCData: JSON · API

Libgit2

libgit2 Shell Command Injection via ssh_libssh2 Backend

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by CNA · CWE-78
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

libgit2 libgit2
  • < 1.8.7
  • >= 1.9.0, < 1.9.7

Fixed in 1.8.7, 1.9.7

Mitigation

Upgrade libgit2 to 1.8.7 or 1.9.7 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published11 Aug 2026 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.