gitoxide gix-submodule command injection in gix_submodule::File::update

Severity: high · CVSS 7.8 · Published 2026-05-26

A vulnerability in the gitoxide Rust library could allow an attacker to execute malicious commands on a user's system. This occurs when a user interacts with a specially crafted Git repository containing a malicious submodule configuration. If exploited, this could lead to full system compromise, data theft, or unauthorized access to the user's environment.

Technologies: gix (crates.io). Vendors: crates.io.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
High severity, with a CVSS score of 7.8, published 26 May 2026.
Which products and versions are affected?
gix (crates.io) >= 0.31.0, < 0.83.0.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked with local access, in a software library.
Am I affected?
Check whether you run gix (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A command injection vulnerability exists in gix-submodule due to an incorrect validation logic in the CommandForbiddenInModulesConfiguration guard. The `gix_submodule::File::update()` function fails to verify that a submodule's 'update' command originates from a trusted local configuration (.git/config) rather than the attacker-controlled .gitmodules file. If a submodule is partially initialized in the local config, the guard is disarmed, allowing the library to execute arbitrary shell commands defined in the .gitmodules file when Submodule::update() is called. This bypasses the security mechanism intended to prevent remote code execution from untrusted repository metadata. The issue is addressed in version 0.83.0.

Affected products

  • gitoxide gix-submodule >= 0.31.0, < 0.83.0
  • gitoxide gix >= 0.31.0, < 0.83.0

Timeline

  • 2026-04-25: advisory: Original advisory GHSA-f26g-jm89-4g65 published by maintainer
  • 2026-05-26: disclosed: NVD publication of CVE-2026-40034
  • 2026-06-30: other: Duplicate advisory GHSA-m4f9-c775-wg56 withdrawn

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.