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.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alpine Linux | — | Upgrade libgit2 | Aug 17, 2026 | Aug 11, 2026 |
| Amazon_linux_2023 | — | Upgrade libgit2-debugsourceUpgrade libgit2Upgrade rust-cargo-c-debugsourceUpgrade libgit2-debuginfoUpgrade cargo-cUpgrade libgit2-develUpgrade cargo-c-debuginfo | Sep 1, 2026 | Aug 11, 2026 |
| Debian | — | Upgrade libgit2 | Aug 23, 2026 | Aug 11, 2026 |
| Redhat_linux | — | — | Aug 17, 2026 | Aug 11, 2026 |
| Ubuntu | — | Upgrade libgit2-dev (Ubuntu Pro)Upgrade libgit2-26 (Ubuntu Pro)Upgrade libgit2-1.9Upgrade libgit2-1.1 (Ubuntu Pro)Upgrade libgit2-1.7Upgrade libgit2-28 (Ubuntu Pro)Upgrade libgit2-devUpgrade libgit2-fixtures (Ubuntu Pro)Upgrade libgit2-24 (Ubuntu Pro)Upgrade libgit2-fixtures | Sep 24, 2026 | Sep 23, 2026 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub