# JLSEC-2026-1275: libgit2 versions v0.27.0 through v1.9.0 built with the libssh2 SSH backend (USE_SSH=libssh2)...

- Severity: Critical 9.6 (CVSS:3.1, scored by Julia Security Advisories) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-08-13T06:24:20.501Z
- Modified: 2026-08-13T06:43:43.837Z
- Related: CVE-2026-5917, EUVD-2026-57011, GHSA-3gwr-xcwq-7892

## Description

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.

(As written by Julia Security Advisories.)

## Affected

- LibGit2_jll (Julia): before 1.9.1+0

## Every score

- Julia Security Advisories: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Julia Security Advisories: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://github.com/advisories/GHSA-3gwr-xcwq-7892> (web)
- <https://github.com/libgit2/libgit2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-5917> (web)
- <https://www.vulncheck.com/advisories/libgit2-shell-command-injection-via-ssh-libssh2-backend> (web)

## Sources

- Julia Security Advisories: [JLSEC-2026-1275](https://osv.dev/vulnerability/JLSEC-2026-1275), CC-BY-4.0, modified 2026-08-13

---

Page: https://cve.day/JLSEC-2026-1275 · Whole record: https://cve.day/JLSEC-2026-1275.json · Rebuilt by cve.day 2026-11-25T22:56:25.923Z
