OS Command Injection Affecting libgit2 package, versions <1.9.0+ds-2+deb13u1


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.86% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN13-LIBGIT2-18832737
  • published15 Aug 2026
  • disclosed11 Aug 2026

Introduced: 11 Aug 2026

NewCVE-2026-5917  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade Debian:13 libgit2 to version 1.9.0+ds-2+deb13u1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libgit2 package and not the libgit2 package as distributed by Debian. See How to fix? for Debian:13 relevant fixed versions and status.

libgit2 versions v0.27.0 through v1.9.0 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.

CVSS Base Scores

version 3.1