What’s Vulnerable › Vulnerabilities

CVE-2026-40034: gitoxide - Command Injection via Partial .gitmodules Override in gix-submodule

Description

gix-submodule before 0.29.0 (gitoxide before 0.5.21, gix before 0.84.0) incorrectly validates the update field in .gitmodules, allowing attackers to bypass the CommandForbiddenInModulesConfiguration guard when a submodule has been initialized with only partial configuration in .git/config. An attacker can inject arbitrary shell commands via the update field in .gitmodules that will be executed when Submodule::update() is called on a previously-initialized submodule, enabling remote code execution.

Affected products

How to fix

Upgrade to a fixed version: gitoxide 0.5.21; gitoxide gix 0.84.0; gitoxide gix-submodule 0.29.0. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-40034 or the next vulnerability affects your stack