Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. gix
  4. ›
  5. GHSA-f26g-jm89-4g65

GHSA-f26g-jm89-4g65: gitoxide: CommandForbiddenInModulesConfiguration Bypass in gix_submodule::File::update() Enables Arbitrary Command Execution via .gitmodules

May 5, 2026

gix_submodule::File::update() is the API that gates whether an attacker-supplied .gitmodules file may set update = !<shell command>. The function is designed to return Err(CommandForbiddenInModulesConfiguration) unless the !command value came from a trusted local source (.git/config). Git CVE CVE-2019-19604 illustrates why this check is necessary.

However, the guard is implemented incorrectly: it checks whether any section with the same submodule name exists from a non-.gitmodules source; it does not verify that the update value came from that section.

Once a submodule has been initialized (any workflow that writes submodule.<name>.url to .git/config), and the attacker subsequently adds update = !cmd to .gitmodules, the guard passes while the command value falls through to the attacker-controlled file.

On an identical repository state, git submodule update aborts with fatal: invalid value for 'submodule.sub.update', while gix::Submodule::update() returns Ok(Some(Update::Command("touch /tmp/pwned"))).

The vulnerable code was introduced in https://github.com/GitoxideLabs/gitoxide/commit/6a2e6a436f76c8bbf2487f9967413a51356667a0.

References

  • github.com/GitoxideLabs/gitoxide
  • github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-f26g-jm89-4g65
  • github.com/advisories/GHSA-f26g-jm89-4g65

Code Behaviors & Features

Detect and mitigate GHSA-f26g-jm89-4g65 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.31.0 before 0.83.0

Fixed versions

  • 0.83.0

Solution

Upgrade to version 0.83.0 or above.

Impact 7.8 HIGH

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

Learn more about CVSS

Weakness

  • CWE-183: Permissive List of Allowed Inputs
  • CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data
  • CWE-501: Trust Boundary Violation
  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

cargo/gix/GHSA-f26g-jm89-4g65.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:18:56 +0000.