Junglewise Threat Intelligence

CVE-2026-40034: Gitoxide gix-submodule command injection via .gitmodules bypass

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

Technologies: GitoxideLabs Gitoxide. Vendors: GitoxideLabs, crates.io.

Executive brief

Gitoxide is a Rust implementation of the Git version control system. A security flaw in how it handles submodules allows a malicious repository to execute arbitrary commands on a user's computer. This occurs when a user interacts with a repository containing a specially crafted submodule configuration that bypasses security checks intended to prevent unauthorized command execution.

Technical details

A vulnerability exists in gix_submodule::File::update() where the security guard intended to prevent arbitrary command execution from .gitmodules is incorrectly implemented. The function checks if any trusted configuration section (like .git/config) exists for a submodule, but fails to verify that the specific 'update' command value actually originated from that trusted section. If a submodule is initialized (creating a trusted section for the URL), an attacker can later add a malicious 'update = !<command>' entry to the untrusted .gitmodules file. Gitoxide will incorrectly attribute the command to the trusted section's existence and return the attacker-controlled command for execution. This bypasses the protection established in response to CVE-2019-19604.

Affected products

  • GitoxideLabs gix >= 0.31.0, < 0.83.0

Timeline

  • 2026-04-25: disclosed
  • 2026-05-05: advisory: GHSA-f26g-jm89-4g65 published
  • 2026-05-05: patched: Fixed in version 0.83.0

References

Related threats