<?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>Gitoxide — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/gitoxide/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 05 May 2026 19:26:09 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/gitoxide/feed.xml" rel="self" type="application/rss+xml"/><item><title>gix and gitoxide Repository Boundary Violation via Symlinked .gitmodules</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-gitoxide-symlink/</link><pubDate>Tue, 05 May 2026 19:26:09 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-gitoxide-symlink/</guid><description>A vulnerability in gix and gitoxide allows a malicious repository to use a symlinked `.gitmodules` file pointing outside the repository, leading to the parsing of arbitrary, attacker-controlled submodule configurations and potential manipulation of downstream git operations.</description><content:encoded><![CDATA[<p>A repository boundary violation vulnerability exists in gitoxide (&lt;= 0.52.0) and gix (&lt; 0.83.0) related to how submodule metadata is loaded. When <code>Repository::submodules()</code> is called, the library prefers the worktree&rsquo;s <code>.gitmodules</code> file. The vulnerability arises because the library uses <code>std::fs::read()</code> to read this file, which follows symbolic links. A malicious repository can exploit this by including a symlinked <code>.gitmodules</code> file that points to an external location. As a result, gitoxide parses submodule configurations from an attacker-controlled file outside the repository, leading to potential injection of malicious metadata. This can mislead callers about submodule metadata, such as name, path, and URL, and influence downstream workflows related to cloning, fetching, or updating.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker creates a malicious repository.</li>
<li>The repository contains a symbolic link named <code>.gitmodules</code> that points to a file outside the repository&rsquo;s worktree controlled by the attacker.</li>
<li>A user clones the malicious repository using a vulnerable version of gitoxide or gix.</li>
<li>The application calls <code>Repository::submodules()</code> to enumerate submodules.</li>
<li><code>std::fs::read()</code> follows the symlink when reading the <code>.gitmodules</code> file.</li>
<li>gitoxide parses the contents of the attacker-controlled file as submodule configuration.</li>
<li>The parsed submodule data, including attacker-controlled name, path, and URL values, is exposed through the <code>Submodule</code> objects.</li>
<li>Downstream git workflows use the injected metadata to clone, fetch, update, or enforce policies, potentially leading to unintended or malicious actions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows for the injection of out-of-repository bytes into the result of <code>Repository::submodules()</code>. This means attackers can mislead callers about submodule metadata, such as name, path, and URL. Any downstream workflow that uses these values to decide clone, fetch, update, or policy behavior is operating on attacker-controlled data. While the report doesn&rsquo;t claim direct command execution, it highlights the risk of metadata injection across the repository boundary, potentially leading to security breaches or data compromise.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritize the following actions to mitigate this vulnerability:</p>
<ul>
<li>Upgrade to gitoxide version &gt; 0.52.0 or gix version &gt;= 0.83.0 to incorporate the fix that prevents following symlinks for <code>.gitmodules</code> (Affected Products).</li>
<li>Implement checks to reject symlinked <code>.gitmodules</code> files when loading from the worktree using <code>symlink_metadata()</code> or <code>lstat</code> style checks (Reference: GHSA-pg4w-g64p-qwhj).</li>
<li>Canonicalize the target path of <code>.gitmodules</code> and verify that it resides within the repository worktree before reading (Reference: GHSA-pg4w-g64p-qwhj).</li>
<li>For security-sensitive callers, prefer loading <code>.gitmodules</code> from the index or <code>HEAD</code> tree rather than following the worktree path (Reference: GHSA-pg4w-g64p-qwhj).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>symlink</category><category>gitoxide</category><category>gix</category><category>repository-boundary-violation</category></item><item><title>gix-pack Denial-of-Service Vulnerabilities</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-gix-pack-dos/</link><pubDate>Tue, 05 May 2026 19:24:15 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-gix-pack-dos/</guid><description>Multiple denial-of-service vulnerabilities exist in `gix-pack`; crafted delta data can cause unchecked array indexing, leading to panics, and uncapped attacker-controlled size headers enable out-of-memory process kills, triggered by malicious pack data during clone/fetch operations.</description><content:encoded><![CDATA[<p>The <code>gix-pack</code> library, a Rust implementation of Git packfile handling, contains multiple denial-of-service (DoS) vulnerabilities. Specifically, unchecked array indexing in delta processing can lead to panics, and uncapped memory allocation based on attacker-controlled size headers allows for out-of-memory (OOM) attacks. These vulnerabilities are triggered when processing malicious pack data during clone or fetch operations.  The affected versions are <code>gix-pack</code> &lt;= 0.68.0. This poses a risk to any application built on gitoxide that clones or fetches from an untrusted remote, including the <code>gix</code> CLI, applications using the <code>gix</code> crate, and CI/CD systems cloning repositories using gitoxide. A crafted pack entry claiming a multi-terabyte size triggers an immediate process kill, which constitutes a single-packet process kill with no recovery.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious Git packfile containing either truncated delta data or an entry with an extremely large <code>decompressed_size</code>.</li>
<li>A user or automated system initiates a <code>git clone</code> or <code>git fetch</code> operation from a repository controlled by the attacker.</li>
<li>The <code>gix-pack</code> library attempts to parse the crafted packfile.</li>
<li>If the packfile contains truncated delta data, the <code>apply()</code> function in <code>gix-pack/src/data/delta.rs</code> attempts to access array indices beyond the bounds of the data buffer, leading to a panic. Alternatively, the <code>parse_header_info()</code> function in <code>gix-pack/src/data/entry/decode.rs</code> can also panic due to unchecked indexing.</li>
<li>If the packfile contains an entry with an extremely large <code>decompressed_size</code>, the library attempts to allocate a large buffer using <code>Vec::with_capacity(size as usize)</code> in <code>bytes_to_entries.rs</code> or <code>Vec::resize()</code> in <code>resolve.rs</code>.</li>
<li>The allocation of the excessively large buffer exhausts available memory, triggering an out-of-memory (OOM) condition.</li>
<li>The operating system terminates the process to prevent further memory exhaustion.</li>
<li>The application using <code>gix-pack</code> crashes, resulting in a denial-of-service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of these vulnerabilities leads to a denial-of-service (DoS) condition. For the panic vulnerability, a small amount of crafted data causes an immediate process abort. For the OOM vulnerability, a single crafted pack entry header causes the process to attempt a multi-terabyte allocation, leading to process termination by the operating system. This can affect various applications and systems, including the <code>gix</code> CLI, applications using the <code>gix</code> crate, and CI/CD systems, potentially disrupting software development workflows. The OOM vector represents a severe risk, as it is a single-packet process kill with no recovery.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of <code>gix-pack</code> when available.</li>
<li>Implement input validation on packfile data before processing to mitigate the OOM vulnerability. Specifically, implement a configurable maximum object size and validate claimed sizes against it before allocation, as suggested in the advisory.</li>
<li>Monitor for process crashes or OOM events related to applications using <code>gix-pack</code>. Deploy the Sigma rule <code>Detect Gix-Pack Uncapped Memory Allocation</code> to identify potential OOM attacks.</li>
<li>Consider blocking or filtering network traffic from untrusted Git repositories to prevent malicious packfiles from reaching vulnerable systems.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>git</category><category>gitoxide</category><category>gix-pack</category></item><item><title>gitoxide Arbitrary Command Execution via .gitmodules Bypass</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-gitoxide-rce/</link><pubDate>Tue, 09 Jan 2024 18:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-gitoxide-rce/</guid><description>A vulnerability in gitoxide's `gix_submodule::File::update()` allows arbitrary command execution via a crafted `.gitmodules` file by incorrectly validating the source of the `update` command, enabling an attacker to inject malicious commands after a submodule has been initialized.</description><content:encoded><![CDATA[<p>A vulnerability exists in gitoxide&rsquo;s <code>gix_submodule::File::update()</code> function, specifically in versions 0.31.0 to 0.82.0, that allows for arbitrary command execution. The vulnerability arises from an insufficient check on the origin of the <code>update</code> command specified in a <code>.gitmodules</code> file.  An attacker can exploit this by pushing a new commit with a malicious <code>update</code> command in <code>.gitmodules</code> after the victim initializes the submodule.  This bypasses the intended security guard, leading to potential remote command execution in downstream code that relies on <code>Submodule::update()</code> and trusts the safety of <code>Update::Command(_)</code>. This issue is similar to CVE-2019-19604, highlighting the risk of unchecked commands in submodule configurations.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker creates a repository with a benign <code>.gitmodules</code> file, containing no <code>update</code> key.</li>
<li>A victim clones the attacker&rsquo;s repository and runs <code>git submodule init</code>, which populates the <code>.git/config</code> file with submodule information (URL, active status), but not the <code>update</code> key.</li>
<li>The attacker pushes a new commit to the repository, adding a malicious <code>update = !&lt;command&gt;</code> line to the <code>.gitmodules</code> file (e.g., <code>update = !touch /tmp/pwned</code>).</li>
<li>The victim runs <code>git pull</code> to update their local repository, incorporating the attacker&rsquo;s modified <code>.gitmodules</code> file. The <code>.git/config</code> file remains unchanged.</li>
<li>A gitoxide-based application calls <code>Submodule::update()</code> to determine the submodule update strategy.</li>
<li>The vulnerable <code>gix_submodule::File::update</code> function is called, which incorrectly validates the source of the <code>update</code> command.</li>
<li>The function checks that a submodule section with the same name exists in a non-.gitmodules source, but does not verify if the update value comes from that section, bypassing the intended security guard.</li>
<li>The attacker-controlled shell command from the <code>.gitmodules</code> file is executed, leading to arbitrary command execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows an attacker to execute arbitrary commands on a system running gitoxide-based applications that utilize submodules. This could lead to complete system compromise, data exfiltration, or denial of service. Any tool, IDE plugin, or CI integration building submodule-update functionality on top of <code>gix</code> within the affected version range inherits this vulnerability.  Successful exploitation depends on the vulnerable application&rsquo;s trust in the output of <code>Submodule::update()</code> which determines the update strategy.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>gix</code> version 0.83.0 or later to patch the vulnerability (<a href="https://github.com/advisories/GHSA-f26g-jm89-4g65)">https://github.com/advisories/GHSA-f26g-jm89-4g65)</a>.</li>
<li>Implement additional validation and sanitization of submodule configurations, especially when handling <code>Update::Command(_)</code> from <code>Submodule::update()</code>, to prevent unintended command execution.</li>
<li>Deploy the Sigma rule below to detect potential exploitation attempts by monitoring for the execution of unexpected commands based on submodule configuration.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>code-vulnerability</category><category>remote-code-execution</category><category>gitoxide</category></item></channel></rss>