<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Libgit2 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/libgit2/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 12 Aug 2026 01:53:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/libgit2/feed.xml" rel="self" type="application/rss+xml"/><item><title>Command Injection in libgit2 via libssh2 Backend</title><link>https://feed.craftedsignal.io/briefs/2026-08-libgit2-rce/</link><pubDate>Wed, 12 Aug 2026 01:53:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-libgit2-rce/</guid><description>A command injection vulnerability in libgit2 versions v0.27.0 through v1.9.0 allows remote code execution during recursive repository clones when using the libssh2 SSH backend.</description><content:encoded><![CDATA[<p>libgit2 versions v0.27.0 through v1.9.0 are vulnerable to command injection when compiled with the libssh2 SSH backend (USE_SSH=libssh2). The flaw resides in the gen_proto() function within ssh_libssh2.c, which fails to sanitize repository path inputs before concatenating them into shell command strings. This vulnerability allows an attacker to achieve remote code execution by forcing a user or system to perform a recursive git clone of a repository containing a maliciously crafted .gitmodules file. When the client processes the submodule URL, the injected shell metacharacters - such as single quotes, semicolons, or pipes - are interpreted by the remote server's shell. This execution occurs with the privileges of the user running the git operation, posing a significant risk to CI/CD pipelines, developer workstations, and automated server environments that rely on libgit2 for repository management.</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows remote attackers to execute arbitrary shell commands under the context of the user or service account performing a git clone operation. This impacts any software, CI/CD pipeline, or automated system utilizing affected libgit2 versions, potentially leading to full system compromise, exfiltration of credentials stored in SSH agents, or lateral movement within build environments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Update all instances of libgit2 to version 1.9.1 or later to resolve the underlying vulnerability in the gen_proto() function.</li>
<li>Audit build environments and CI/CD configurations to identify applications linked against the libssh2 SSH backend of libgit2.</li>
<li>Monitor git operations for unexpected recursive submodule processing, particularly those targeting unknown or untrusted external repositories.</li>
<li>Implement strict path validation and utilize SSH configurations that restrict command execution for services performing automated clones.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category></item></channel></rss>