CVE-2026-5917
No exploitation reported by the sources we read.
- Published2026-08-11
- WeaknessCWE-78
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2026-08-1122:17CVE publishedNVD
Versions per branch
Products declared by the CNA1 product
As VulnCheck, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- libgit2other versions: affectedAffected
- < 1.8.7fixed in 1.8.7custom
- ≥ 1.9.0, < 1.9.7fixed in 1.9.7semver
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-10-01
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- LibGit2_jllJuliaall versions · fixed in 1.9.1+0
- libgit2Ubuntu:Pro:22.04:LTSall versions · fixed in 1.1.0+dfsg.1-4.1ubuntu0.1+esm2
- libgit2Ubuntu:Pro:20.04:LTSall versions · fixed in 0.28.4+dfsg.1-2ubuntu0.1+esm2
- libgit2Ubuntu:Pro:18.04:LTSall versions · fixed in 0.26.0+dfsg.1-1.1ubuntu0.2+esm3
- libgit2Ubuntu:Pro:16.04:LTSall versions · fixed in 0.24.1-2ubuntu0.2+esm4
- libgit2Ubuntu:26.04:LTSall versions · fixed in 1.9.1+ds-1ubuntu1.2
- libgit2Ubuntu:24.04:LTSall versions · fixed in 1.7.2+ds-1ubuntu3.2
- libgit2openSUSE:Tumbleweedall versions · fixed in 1.9.7-1.1
13 more package ranges on OSV.dev
Vendor advisories
libgit2: libgit2: Arbitrary code execution via shell command injection in SSH backend
libgit2.src as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
Fix
- Workaround from the vendor Red Hat Product Security CVE-2026-5917 · 1 productTo mitigate this issue, avoid cloning Git repositories from untrusted sources, especially those containing submodules. If possible, disable automatic recursive cloning of submodules when working with potentially untrusted repositories. Ensure that SSH user accounts used for cloning have minimal nec…
- No fix available, says the vendor Red Hat Product Security CVE-2026-5917 · 1 productAffected
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-19
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-08-12
- CNACVSS 4.08.6known since 2026-10-23
- NVDCVSS 3.18.8read 2026-10-23
- CNAweakness (CWE)CWE-78known since 2026-10-23
- FIRST EPSSEPSS score1.4 %2026-11-18
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2026-57011same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-3gwr-xcwq-7892same flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2026-1275same flawJulia Security Advisories · CC-BY-4.0
- MGASA-2026-0570advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2026-4621advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-4622advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-4623advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-4959advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2026:11521-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- USN-8809-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CVSS 4.0 vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/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
- Published
- 2026-08-11
- Last Modified
- 2026-09-24
- NVD status
- Deferred
- GitHub Advisory
- GHSA-3gwr-xcwq-7892
Frequently asked questions
What is CVE-2026-5917?
Is CVE-2026-5917 actively exploited?
What is the CVSS score for CVE-2026-5917?
Running libgit2? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-3gwr-xcwq-7892
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0