BlackTreeCVE Intelligence
← Back to the CVE catalogue
Full vulnerability report · 2026
CVE-2026-5917High confidence

libgit2 Shell Command Injection via ssh_libssh2 Backend

libgit2 · libgit2

Official source article: GitHub GHSA-XQJ4-2J5V-RR75 ↗. Check the applicable product and release in the original source.

8.6HighCVSS 4.0
Recommended action
Patch only the product branches with a verified fix

High technical severity; prioritise exposed affected systems while verifying vendor guidance. Verified remediation exists for at least one product or source, but 2 structured product or package states remain unresolved. Apply remediation only to the exact product branch confirmed by its source.

Fix availability varies by product
R
Operational reassessment

Published severity in operational context

Open reassessment dashboard →
Published severityHighOperational priority:High, unchanged from published severity.unchanged

Evidence used

  • No CISA KEV confirmation is currently recorded.
  • EPSS is 1.43% for the current model date.

Compensating controls

  • Validate the affected product branch and deploy the verified fixed release.
  • Restrict the affected network interface to trusted sources where business-safe.
  • Monitor vendor guidance and exploitation sources for a material change.

Verification

  1. Confirm that the asset runs libgit2 libgit2 and falls inside the recorded affected range.
  2. Verify the installed build against the product-specific fixed version after deployment.
  3. Validate exposure, authentication requirements and compensating controls in the actual environment.
  4. Reopen this reassessment when CVSS, KEV, EPSS, exploit evidence or remediation changes.
Mitigation target: Within 30 daysRemediation target: Within 180 days

This automated reassessment organises public evidence. It does not know asset exposure, business impact or control effectiveness and does not replace CVSS or a human risk decision.

Cross-source reconciliation

Remediation availability differs by product scope

Verified remediation exists for at least one product or source, but 2 structured product or package states remain unresolved. Apply remediation only to the exact product branch confirmed by its source.

Distribution package intelligence

Release-specific package status

Alpine, Debian, ubuntu findings are scoped to the named distribution, release and source package. An absent finding does not mean a package is unaffected.

6 package states
Package result overrides the generic status

BlackTree has verified remediation for at least one product or source, but the relevant distribution still reports no fixed package for 1 affected package state shown here. Treat those rows as affected with no fix until that distribution publishes a fixed version.

Repository candidate not checked

A published vendor fix does not prove that a matching update is enabled and installable on a particular asset. Confirm the local package candidate before scheduling remediation.

Distribution releaseSource packageVendor stateFixed versionEvidence
Alpine v3.23v3.23 · communitylibgit2Vendor fix publishedAlpine records a security fix at this version. An absent entry does not mean the package is unaffected.1.9.7-r0Alpine Security Database ↗Source updated 11 Sep 2026
Debian trixietrixie · sourcelibgit2Vendor fix publishedDebian records a fixed source-package version for this release.1.9.0+ds-2+deb13u1Debian Security Tracker ↗Source updated 5 Oct 2026
Debian bookwormbookworm · sourcelibgit2Affected, no fix publishedDebian currently tracks this release as open.Not published in this feedDebian Security Tracker ↗Source updated 5 Oct 2026
Debian forkyforky · sourcelibgit2Vendor fix publishedDebian records a fixed source-package version for this release.1.9.7+ds-1Debian Security Tracker ↗Source updated 5 Oct 2026
Debian sidsid · sourcelibgit2Vendor fix publishedDebian records a fixed source-package version for this release.1.9.7+ds-1Debian Security Tracker ↗Source updated 5 Oct 2026
Ubuntu 24.04 LTSnoble · standard archivelibgit2Vendor fix publishedCanonical reports that a fixed source package version has been published. Repository candidate availability is not checked by BlackTree.1.7.2+ds-1ubuntu3.2Canonical Ubuntu Security ↗Source updated 5 Oct 2026
Direct vendor intelligence

Authoritative vendor CSAF and VEX advisories

Structured product status and remediation from the issuing vendor. Product-state explanations are always visible; large lists can be searched or downloaded.

2 current
CVE-2026-5917 · CSAF 2.0 · revision 5 · interimSUSE Product Security TeamCVE-2026-5917
112 known affected

The vendor explicitly identifies these products as affected by this CVE.

  • libgit2 as component of SUSE Linux Enterprise Desktop 15 SP7
  • libgit2-1_7 as component of SUSE Linux Enterprise Desktop 15 SP7
  • libgit2-devel as component of SUSE Linux Enterprise Desktop 15 SP7
  • libgit2-tools as component of SUSE Linux Enterprise Desktop 15 SP7
  • libgit2 as component of SUSE Linux Enterprise High Performance Computing 15 SP1
  • libgit2-26 as component of SUSE Linux Enterprise High Performance Computing 15 SP1
  • libgit2-devel as component of SUSE Linux Enterprise High Performance Computing 15 SP1
  • libgit2 as component of SUSE Linux Enterprise High Performance Computing 15 SP2
  • libgit2-26 as component of SUSE Linux Enterprise High Performance Computing 15 SP2
  • libgit2-28 as component of SUSE Linux Enterprise High Performance Computing 15 SP2
  • libgit2-devel as component of SUSE Linux Enterprise High Performance Computing 15 SP2
  • libgit2 as component of SUSE Linux Enterprise High Performance Computing 15 SP3
Summary
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.
Remediation
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
CVE-2026-5917 · CSAF 2.0 · revision 3 · finalRed Hat Product Securitylibgit2: libgit2: Arbitrary code execution via shell command injection in SSH backend
1 known affected

The vendor explicitly identifies these products as affected by this CVE.

  • libgit2.src as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
Summary
A flaw was found in libgit2 when built with the libssh2 SSH backend. This vulnerability allows a remote attacker to execute arbitrary commands on an SSH server. By crafting a malicious repository path containing unescaped shell metacharacters, an attacker can inject commands that are then interpreted by the remote server's shell during operations like a recursive clone. This could lead to arbitrary code execution under the victim's SSH user account.
Remediation
To 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 necessary privileges to limit the impact of successful exploitation.
Optional official sources

National CERT insights
?CERT means Computer Emergency Response Team; CSIRT is the closely related term Computer Security Incident Response Team.

Choose official national sources for this report. Each advisory shows its original language. Your selection is remembered on this device and included in shared links.

Official European source

ENISA European Vulnerability Database

Official EUVD identifiers, advisory evidence and known-exploited context. Missing fields are not treated as evidence of low risk.

1 current
ENISA EUVD identifier

EUVD-2026-57011

No EUVD known-exploited evidence

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.

EUVD state
Present in the current official mapping
Known exploitation
Not present in the current ENISA EUVD known-exploited dataset. This is not proof of no exploitation.
ENISA score
8.6 · CVSS 4.0
Advisory evidence
No linked advisory details stored yet
Recommended actionPatch only the product branches with a verified fix

High technical severity; prioritise exposed affected systems while verifying vendor guidance. Verified remediation exists for at least one product or source, but 2 structured product or package states remain unresolved. Apply remediation only to the exact product branch confirmed by its source.

Fix availability varies by product
01

What, why and how

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.

What

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.

Why

Untrusted input is incorporated into an operating-system command without safe parameter handling.

How

An attacker operating through a network path may attempt exploitation when the stated preconditions are met. If successful, the issue may execute code or commands in the affected security context.

What

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.

Why

Untrusted input is incorporated into an operating-system command without safe parameter handling.

How

An attacker operating through a network path may attempt exploitation when the stated preconditions are met. If successful, the issue may execute code or commands in the affected security context.

02

Exploit reality and attack path

CVSS severity, EPSS forecast probability, public exploit material and CISA-confirmed exploitation are separate signals.

Observed exploitation
?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.
No confirmed evidence

No CISA KEV match was present at the last successful refresh. This means no confirmation from that source, not proof of no exploitation.

Public PoC / exploit material
?Confirmed exploitation and public exploit material are separate signals. Attacks can occur without public proof-of-concept or exploit code.
None recorded

No exploit-tagged reference or CISA SSVC proof-of-concept state is currently recorded. Research may still exist outside the structured feeds.

Likely attack path
a network path → Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') → execute code or commands in the affected security context
Attack surface
Network
Privileges required
None: unauthenticated exploitation is possible
User interaction
Active interaction required
Attack complexity
Low: no specialised conditions are recorded
Security boundary
Not a CVSS 4.0 base metric
Weakness
?CWE means Common Weakness Enumeration: a standard category for the underlying weakness.
CWE-78 ↗

CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'). The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

CVSS vector
?CVSS means Common Vulnerability Scoring System. The vector records the metric values used to calculate technical severity.
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

Common Vulnerability Scoring System 4.0: the compact vector below is decoded into plain language.

AVNetworkAttack vector: The vulnerable component can be reached over a network.ACLowAttack complexity: No specialised conditions are required beyond attacker-controlled input.ATNoneAttack requirements: No additional deployment or execution condition is required.PRNonePrivileges required: The attacker does not need an account or existing privileges.UIActiveUser interaction: A user must take a deliberate action for exploitation to succeed.VCHighVulnerable-system confidentiality: A successful attack can cause a major loss.VIHighVulnerable-system integrity: A successful attack can cause a major loss.VAHighVulnerable-system availability: A successful attack can cause a major loss.SCNoneSubsequent-system confidentiality: No direct loss is represented by this metric.SINoneSubsequent-system integrity: No direct loss is represented by this metric.SANoneSubsequent-system availability: No direct loss is represented by this metric.
Post-exploitation / living off the land
After compromise, an attacker may use built-in shells, scripting engines, scheduled tasks and native network utilities for discovery, persistence or movement. This is a plausible LoTL path, not evidence that it has occurred for every attack.
NetworkUnauthenticatedRemote code executionCWE-78
A

Official authority intelligence

Only matched European and national findings are included. Language selectors and unavailable sources are omitted.

ENISA EUVD · EUVD-2026-57011Official EUVD mapping

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.

Official EUVD record ↗
03

Patch and workaround

Operational remediation based on structured source evidence.

Status
?Patch availability is based on structured fixed-version fields and authoritative update references. If no fix is verified, check the vendor advisory before making a change.
Fix availability varies by product
Affected
Fixed
An authoritative update reference is available, but the fixed version is not recorded in the structured CVE fields. Check the linked vendor advisory for the applicable release.
Action
Use the product-specific evidence above. Patch only products with a verified fixed release, and keep every affected or under-investigation state without a matching fix in the remediation queue.
Workaround
No verified workaround is recorded. If business-safe, reduce exposure to the affected interface and allow only trusted sources until authoritative guidance is available.
04

Evidence and provenance

Published 11 Aug 2026 · Last source change 1 Oct 2026, 15:20 UTC · CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CVE recordCVE.org · 5.2
CVSS sourceCNA
EPSS source
?The date BlackTree first stored a score for this CVE from the daily FIRST EPSS feed.
FIRST · tracked since 2026-08-14
European sourceENISA EUVD · EUVD-2026-57011
Product sourceVendor CSAF · SUSE Product Security Team
Remediation sourceVendor CSAF · SUSE Product Security Team
CWE sourceCNA
NVD statusNVD not scheduled

Core structured fields are present and their contributing authorities are shown above.

Material change intelligence

What changed after publication

View recent updates ↗
  1. Vendor guidanceAuthoritative vendor guidance changed: removed remediation: suse.com/CVE-2026-5917.
    Before
    remediation: suse.com/CVE-2026-5917
    After
    no authoritative guidance recorded
    CNA ↗
  2. Remediation statusRemediation status changed from Mitigation available to Awaiting fix.
    Before
    Mitigation available
    After
    Awaiting fix
    CNA ↗
  3. Remediation statusRemediation status changed from Awaiting fix to Mitigation available.
    Before
    Awaiting fix
    After
    Mitigation available
    SUSE Product Security Team ↗
  4. Affected versionsThe structured affected or fixed version information changed.
    Before
    libgit2-devel as a component of Red Hat Enterprise Linux 8; libgit2.src as a component of Red Hat Enterprise Linux 8; libgit2.src as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
    After
    libgit2.src as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
    Red Hat Product Security ↗
  5. Affected versionsThe structured affected or fixed version information changed.
    Before
    cargo as a component of Red Hat Enterprise Linux 10; clippy as a component of Red Hat Enterprise Linux 10; rust-analyzer as a component of Red Hat Enterprise Linux 10; rust-debugger-common as a component of Red Hat Enterprise Linux 10; rust-doc as a component of Red Hat Enterprise Linux 10; rust-gdb as a component of Red Hat Enterprise Linux 10; rust-lldb as a component of Red Hat Enterprise Linux 10; rust-src as a component of Red Hat Enterprise Linux 10; rust-std-static as a component of Red Hat Enterprise Linux 10; rust-std-static-aarch64-unknown-none-softfloat as a component of Red Hat Enterprise Linux 10; rust-std-static-wasm32-unknown-unknown as a component of Red Hat Enterprise Linux 10; rust-std-static-wasm32-wasip1 as a component of Red Hat Enterprise Linux 10; rust-std-static-x86_64-unknown-none as a component of Red Hat Enterprise Linux 10; rust-toolset as a component of Red Hat Enterprise Linux 10; rust-toolset-srpm-macros as a component of Red Hat Enterprise Linux 10; rust.src as a component of Red Hat Enterprise Linux 10; rustfmt as a component of Red Hat Enterprise Linux 10; libgit2-devel as a component of Red Hat Enterprise Linux 8; libgit2.src as a component of Red Hat Enterprise Linux 8; cargo as a component of Red Hat Enterprise Linux 9; clippy as a component of Red Hat Enterprise Linux 9; rust as a component of Red Hat Enterprise Linux 9; rust-analysis as a component of Red Hat Enterprise Linux 9; rust-analyzer as a component of Red Hat Enterprise Linux 9; rust-debugger-common as a component of Red Hat Enterprise Linux 9; rust-doc as a component of Red Hat Enterprise Linux 9; rust-gdb as a component of Red Hat Enterprise Linux 9; rust-lldb as a component of Red Hat Enterprise Linux 9; rust-src as a component of Red Hat Enterprise Linux 9; rust-std-static as a component of Red Hat Enterprise Linux 9; and 6 more
    After
    libgit2-devel as a component of Red Hat Enterprise Linux 8; libgit2.src as a component of Red Hat Enterprise Linux 8; libgit2.src as a component of Red Hat Enterprise Linux AI (RHEL AI) 3
    Red Hat Product Security ↗
  6. Affected versionsThe structured affected or fixed version information changed.
    Before
    < 1.8.7; 1.9.0 < 1.9.7 · Fixed: No fixed version is explicitly recorded in the structured CVE data.
    After
    libgit2: < 1.8.7, 1.9.0 < 1.9.7 · Fixed: No fixed version is explicitly recorded in the structured CVE data.
    CNA ↗
  7. Vendor guidanceAuthoritative vendor guidance changed: removed patch: github.com/GHSA-xqj4-2j5v-rr75; removed remediation: github.com/GHSA-xqj4-2j5v-rr75.
    Before
    patch: github.com/GHSA-xqj4-2j5v-rr75 · remediation: github.com/GHSA-xqj4-2j5v-rr75
    After
    no authoritative guidance recorded
    CNA ↗
  8. Affected versionsThe structured affected or fixed version information changed.
    Before
    < 1.8.7; 1.9.0 < 1.9.7 · Fixed: An authoritative update reference is available, but the fixed version is not recorded in the structured CVE fields. Check the linked vendor advisory for the applicable release.
    After
    < 1.8.7; 1.9.0 < 1.9.7 · Fixed: No fixed version is explicitly recorded in the structured CVE data.
    CNA ↗
  9. Remediation statusRemediation status changed from Patch available to Awaiting fix.
    Before
    Patch available
    After
    Awaiting fix
    CNA ↗
  10. Vendor guidanceAuthoritative vendor guidance changed: added patch: github.com/GHSA-xqj4-2j5v-rr75; added remediation: github.com/GHSA-xqj4-2j5v-rr75.
    Before
    no authoritative guidance recorded
    After
    patch: github.com/GHSA-xqj4-2j5v-rr75 · remediation: github.com/GHSA-xqj4-2j5v-rr75
    github.com ↗
  11. Affected versionsThe structured affected or fixed version information changed.
    Before
    0.27.0 ≤ 1.9.0 · Fixed: No fixed version is explicitly recorded in the structured CVE data.
    After
    < 1.8.7; 1.9.0 < 1.9.7 · Fixed: An authoritative update reference is available, but the fixed version is not recorded in the structured CVE fields. Check the linked vendor advisory for the applicable release.
    CNA ↗
  12. Remediation statusRemediation status changed from Awaiting fix to Patch available.
    Before
    Awaiting fix
    After
    Patch available
    github.com ↗
  13. SeveritySeverity changed from Critical to High.
    Before
    Critical
    After
    High
    CNA ↗
  14. CVSS scoreCVSS score changed from 9.4 (CVSS 4.0 · CNA · 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) to 8.6 (CVSS 4.0 · CNA · 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).
    Before
    9.4 (CVSS 4.0 · CNA · 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)
    After
    8.6 (CVSS 4.0 · CNA · 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)
    CNA ↗
Material fields only · duplicate refreshes suppressed · history retained for the configured operational retention period
Technical terms and abbreviations used in this report
CVE
Common Vulnerabilities and Exposures: the public identifier for one disclosed vulnerability.
CVSS
Common Vulnerability Scoring System: a technical severity framework; it is not patching priority by itself.
EPSS
Exploit Prediction Scoring System: FIRST's estimate of the probability that exploitation activity will be observed in the next 30 days; it is a forecast, not confirmation.
CWE
Common Weakness Enumeration: the standard category describing the underlying software or hardware weakness.
CNA
CVE Numbering Authority: an organisation authorised to assign and publish CVE records.
CISA ADP
Cybersecurity and Infrastructure Security Agency Authorized Data Publisher: structured enrichment added to a CVE record.
NVD
National Vulnerability Database: NIST's enrichment service for CVE records.
CERT / CSIRT
A computer security incident response team that publishes warnings or coordinates incident response.
PoC
Proof of concept: public material that demonstrates or helps reproduce exploitation.
CSAF
Common Security Advisory Framework: a machine-readable format for security advisories.
LoTL
Living off the land: abuse of legitimate tools or system functions during an attack.
Free version - for non-commercial use only.CVE-2026-5917 · cve.blacktree.nl