LiveActive security incident?Get immediate response
CVE Record

CVE-2026-5917: libgit2 v0.27.0-v1.9.0 Shell Command Injection via ssh_libssh2 Backend

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.

CriticalCVSS 9.6Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

Affected software can turn a malicious Git submodule address into commands executed on an SSH server using the victim’s account. Exploitation requires a vulnerable libgit2 build and user-triggered processing, such as a recursive clone. Successful attacks could compromise data, systems, and availability on the SSH server.

Executive priority

Treat confirmed vulnerable configurations as an urgent remediation priority, especially in CI/CD, developer tooling, or services processing untrusted repositories. Prioritize configuration discovery first because the issue depends on the libssh2 backend and a specific workflow. Do not represent exploitation as active based on the supplied evidence.

Technical view

The reported flaw is in ssh_libssh2.c gen_proto(). In libgit2 built with USE_SSH=libssh2, an attacker-controlled repository path is inserted into a command without safely escaping shell metacharacters before libssh2_channel_exec(). A crafted .gitmodules SSH URL processed during a recursive clone can therefore cause shell command injection on the remote SSH server.

Likely exposure

Exposure is limited to applications embedding reportedly affected libgit2 versions, compiled with the libssh2 SSH backend, that process attacker-influenced SSH repository or submodule paths. Recursive cloning of untrusted repositories is the clearest reported trigger. Builds using another SSH backend are not established as affected by this source bundle.

Exploitation context

The CVSS 3.1 score is 9.6, reflecting potential high confidentiality, integrity, and availability impact. User interaction is required, but no privileges are required to prepare the malicious repository metadata. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation.

Researcher notes

The narrative reports versions 0.27.0 through 1.9.0, while the structured affected entry lists only 0.27.0. Validate the authoritative affected range and fixed release with updated CVE or vendor guidance. The reported execution context is the remote SSH server under the victim’s SSH account, not necessarily the cloning client.

Mitigation direction

  • Identify and prioritize systems using libgit2 with the libssh2 SSH backend.
  • Avoid recursive cloning or submodule processing for untrusted repositories until remediation is confirmed.
  • Restrict attacker-controlled SSH repository and submodule URLs in affected workflows.
  • Apply vendor-confirmed fixes when available; the supplied sources do not name a patched version.
  • Review vendor guidance before changing SSH backends or rebuilding libgit2.

Validation and detection

  • Inventory embedded libgit2 versions across developer tools, services, build agents, and automation.
  • Verify whether each libgit2 build uses USE_SSH=libssh2.
  • Identify workflows performing recursive clones or processing untrusted .gitmodules files.
  • Review accepted SSH repository paths and determine whether untrusted users can influence them.
  • Inspect relevant SSH server telemetry for anomalous activity associated with clone or submodule operations.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-5917 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.6CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H2.86VulnCheck
9.4CVSS 4.0CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HVulnCheck

Vulnerability scoring details

Base CVSS 4.0 score

9.4Critical
CVSS 4.0 vector shape for CVE-2026-5917Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: 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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
libgit2libgit20.27.0affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.