Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.9
libgit2 lets attacker run commands via crafted repository path
published 10 days ago
Summary
If you use libgit2 versions earlier than 1.8.7 or 1.9.0‑1.9.6 with the libssh2 SSH option, an attacker can embed special characters in a repository URL and cause the server to execute unwanted commands. This can happen when a malicious .gitmodules file is processed during a recursive clone, affecting Docker images that include this library. Upgrade libgit2 to the latest release or rebuild it without the libssh2 SSH backend, and avoid accepting untrusted repository paths.
What to do
The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| Docker Hardened Images:Alpine:3.24 | docker hardened images | libgit2 | All versions |
Original advisory text
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…
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.
References
- https://scout.docker.com/v/DHI-dxqm-j2tl-w6nv-wzh6 Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-5917 Vendor Advisory
- https://security.alpinelinux.org/vuln/CVE-2026-5917 Vendor Advisory
- https://alas.aws.amazon.com/AL2023/ALAS-2026-2083.html Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-5917 Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53587 Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53586 Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53585 Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53584 Vendor Advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53583 Vendor Advisory
- https://alas.aws.amazon.com/AL2023/ALAS-2026-2113.html Vendor Advisory
- https://security-tracker.debian.org/tracker/CVE-2026-5917 Vendor Advisory
- https://ubuntu.com/security/CVE-2026-5917 Vendor Advisory
- http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-5917 Vendor Advisory
Internet-facing
14 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit (estimated)
- Gives an attacker full control (estimated)
Timeline
Published11 Nov 2026
Updated16 Nov 2026
First seen16 Nov 2026
Sources
DHI-dxqm-j2tl-w6nv-wzh6 · OSV
Track software like this
Free during beta