Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.9%top 45%

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… (CVE-2026-5917)

0
Critical
Published: 08/12/2026 (08/12/2026, 00:31:11 UTC)
Source: GCVE Database

Description

libgit2 versions v0.27.0 through v1.9.0 built with the libssh2 SSH backend contain a shell command injection vulnerability. This flaw allows remote attackers to execute arbitrary commands on an SSH server by supplying a repository path with unescaped shell metacharacters. The vulnerability arises from the gen_proto() function in ssh_libssh2.c, which inserts the repository path directly into a shell command without escaping special characters before execution. An attacker can exploit this by crafting a malicious submodule URL in a .gitmodules file, causing command execution during a recursive clone under the victim's SSH user account.

CVSS v3.1

Score 9.6critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

GitHub Actionsmore threats →ai
libgit2/libgit2
pkg:github/libgit2/libgit2
Affected versions
>=0.27.0 <=1.9.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/12/2026, 17:21:42 UTC

Technical Analysis

The vulnerability in libgit2 (CVE-2026-5917) affects versions v0.27.0 through v1.9.0 when built with the libssh2 SSH backend (USE_SSH=libssh2). The gen_proto() function in ssh_libssh2.c constructs a shell command string that includes the repository path without escaping shell metacharacters such as single quotes, semicolons, or pipes. This allows an attacker to inject arbitrary shell commands on the SSH server by providing a malicious repository path, typically via a crafted submodule URL in a .gitmodules file. When a recursive clone processes this submodule, the injected commands execute under the victim's SSH user account. The vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command).

Potential Impact

Successful exploitation enables remote attackers to execute arbitrary commands on the SSH server with the privileges of the victim's SSH user account. This can lead to full compromise of the server, including confidentiality, integrity, and availability impacts. The CVSS v3.1 base score is 9.6 (critical), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, scope change, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using libgit2 versions v0.27.0 through v1.9.0 built with the libssh2 SSH backend for operations involving untrusted repository paths or submodules. Consider disabling recursive cloning of submodules or sanitizing repository paths to prevent injection of shell metacharacters.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-3gwr-xcwq-7892
Osv Schema Version
1.4.0
Aliases
["CVE-2026-5917"]
Ecosystems
[]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a7c9b6bbf8831d539cdfc11

Added to database: 08/12/2026, 16:12:27 UTC

Last enriched: 08/12/2026, 17:21:42 UTC

Last updated: 08/13/2026, 00:41:13 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses