{
  "id": "CVE-2026-5917",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-5917",
  "published_at": "2026-08-11T21:40:29.078Z",
  "title": "libgit2 Shell Command Injection via ssh_libssh2 Backend",
  "vendor": "libgit2",
  "product": "libgit2",
  "cvss": {
    "score": 8.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-78",
  "cvss_by_source": {
    "cna": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "libgit2",
        "product": "libgit2",
        "ranges": [
          "\u003c 1.8.7",
          "\u003e= 1.9.0, \u003c 1.9.7"
        ],
        "fixed_in": [
          "1.8.7",
          "1.9.7"
        ]
      }
    ],
    "upgrade": [
      "Upgrade libgit2 to 1.8.7 or 1.9.7 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
