Executive brief
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.
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
- https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-f26g-jm89-4g65
- https://github.com/GitoxideLabs/gitoxide/commit/6a2e6a436f76c8bbf2487f9967413a51356667a0
- https://github.com/GitoxideLabs/gitoxide/commit/dd5c18d9e526e8de462fa40aa047acd097cfa7dc
- https://red.anthropic.com/2026/cvd/findings/ANT-2026-6SNS6KMP
- https://www.vulncheck.com/advisories/gitoxide-command-injection-via-partial-gitmodules-override-in-gix-submodule