# CVE-2026-5917: libgit2: 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 s...

CVE-2026-5917 is fixed in 13 products on 1 platform, first by libgit2-1.1 1.1.0+dfsg.1-4.1ubuntu0.1+esm2, released August 11, 2026. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2026-5917
- Priority: High
- CVSS: 8.8 (high)
- EPSS: 0.0143
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Aug 11, 2026

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | cargo-c amzn 2023 | 0.10.21-1.amzn2023.0.2 | [ALAS2023-2026-2113](https://patchblox.com/security/data/fix/linux/alas2023-2026-2113.md) | Aug 31, 2026 |
| Linux | cargo-c-debuginfo amzn 2023 | 0.10.21-1.amzn2023.0.2 | [ALAS2023-2026-2113](https://patchblox.com/security/data/fix/linux/alas2023-2026-2113.md) | Aug 31, 2026 |
| Linux | libgit2 Debian 12.15 (bookworm) | 1.5.1+ds-1+deb12u2 | [DEBIAN-CVE-2026-5917](https://patchblox.com/security/data/fix/linux/debian-cve-2026-5917.md) | Aug 20, 2026 |
| Linux | libgit2 Debian 13.5 (trixie) | 1.9.0+ds-2+deb13u1 | [DEBIAN-CVE-2026-5917](https://patchblox.com/security/data/fix/linux/debian-cve-2026-5917.md) | Aug 20, 2026 |
| Linux | libgit2 Debian 14 | 1.9.7+ds-1 | [DEBIAN-CVE-2026-5917](https://patchblox.com/security/data/fix/linux/debian-cve-2026-5917.md) | Aug 20, 2026 |
| Linux | libgit2 amzn 2023 | 1.6.4-116.amzn2023 | [ALAS2023-2026-2083](https://patchblox.com/security/data/fix/linux/alas2023-2026-2083.md) | Aug 31, 2026 |
| Linux | libgit2-1.1 Ubuntu 22.04.1 LTS (jammy) | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | [libgit2-1.1 1.1.0+dfsg.1-4.1ubuntu0.1+esm2](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libgit2-1.1-1.1.0-dfsg.1-4.1ubuntu0.1-esm2.md) | Aug 11, 2026 |
| Linux | libgit2-1.7 Ubuntu 24.04.5 LTS (noble) | 1.7.2+ds-1ubuntu3.2 | [libgit2-1.7 1.7.2+ds-1ubuntu3.2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-libgit2-1.7-1.7.2-ds-1ubuntu3.2.md) | Aug 11, 2026 |
| Linux | libgit2-1.9 Ubuntu 26.04.1 LTS (resolute) | 1.9.1+ds-1ubuntu1.2 | [libgit2-1.9 1.9.1+ds-1ubuntu1.2](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-libgit2-1.9-1.9.1-ds-1ubuntu1.2.md) | Aug 11, 2026 |
| Linux | libgit2-26 Ubuntu 18.04.6 LTS (bionic) | 0.26.0+dfsg.1-1.1ubuntu0.2+esm3 | [libgit2-26 0.26.0+dfsg.1-1.1ubuntu0.2+esm3](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libgit2-26-0.26.0-dfsg.1-1.1ubuntu0.2-esm3.md) | Aug 11, 2026 |
| Linux | libgit2-28 Ubuntu 20.04 LTS (focal) | 0.28.4+dfsg.1-2ubuntu0.1+esm2 | [libgit2-28 0.28.4+dfsg.1-2ubuntu0.1+esm2](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libgit2-28-0.28.4-dfsg.1-2ubuntu0.1-esm2.md) | Aug 11, 2026 |
| Linux | libgit2-debuginfo amzn 2023 | 1.6.4-116.amzn2023 | [ALAS2023-2026-2083](https://patchblox.com/security/data/fix/linux/alas2023-2026-2083.md) | Aug 31, 2026 |
| Linux | libgit2-debugsource amzn 2023 | 1.6.4-116.amzn2023 | [ALAS2023-2026-2083](https://patchblox.com/security/data/fix/linux/alas2023-2026-2083.md) | Aug 31, 2026 |
| Linux | libgit2-devel amzn 2023 | 1.6.4-116.amzn2023 | [ALAS2023-2026-2083](https://patchblox.com/security/data/fix/linux/alas2023-2026-2083.md) | Aug 31, 2026 |
| Linux | libgit2-fixtures Ubuntu 22.04.1 LTS (jammy) | 1.1.0+dfsg.1-4.1ubuntu0.1+esm2 | [libgit2-fixtures 1.1.0+dfsg.1-4.1ubuntu0.1+esm2](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libgit2-fixtures-1.1.0-dfsg.1-4.1ubuntu0.1-esm2.md) | Aug 11, 2026 |
| Linux | libgit2-fixtures Ubuntu 24.04.5 LTS (noble) | 1.7.2+ds-1ubuntu3.2 | [libgit2-fixtures 1.7.2+ds-1ubuntu3.2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-libgit2-fixtures-1.7.2-ds-1ubuntu3.2.md) | Aug 11, 2026 |
| Linux | libgit2-fixtures Ubuntu 26.04.1 LTS (resolute) | 1.9.1+ds-1ubuntu1.2 | [libgit2-fixtures 1.9.1+ds-1ubuntu1.2](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-libgit2-fixtures-1.9.1-ds-1ubuntu1.2.md) | Aug 11, 2026 |
| Linux | rust-cargo-c-debugsource amzn 2023 | 0.10.21-1.amzn2023.0.2 | [ALAS2023-2026-2113](https://patchblox.com/security/data/fix/linux/alas2023-2026-2113.md) | Aug 31, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
