RCE in Libgit2

CVE-2026-5917

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.

Vulnerability class: Command Injection (OS Command Injection)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.014 (71.8th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 72nd percentile — 71.8% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2026-5917: rose from 0.009 to 0.014.

EPSS over last 30 days · oldest: 0.009 · newest: 0.014 · change: +0.005

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-5917?
CVE-2026-5917 is a high-severity vulnerability in Libgit2, classified under OS Command Injection. CVSS score: 8.8/10. Published 2026-08-11.
How severe is CVE-2026-5917?
High severity. CVSS v3 base score is 8.8 out of 10.