Skip to content

GHSA-m4f9-c775-wg56

Duplicate Advisory: gitoxide: CommandForbiddenInModulesConfiguration Bypass in gix_submodule::File::update() Enables Arbitrary Command Execution via .gitmodules

High Withdrawn Jun 30, 2026 crates.io
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
Fix
0.83.0
Upgrade gix to this version or later

Description

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-f26g-jm89-4g65. This link is maintained to preserve external references.

Original Description

gix-submodule before 0.82.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 versions

crates.io

PackageVulnerableFixed in
gix
>= 0.31.0, < 0.83.0
0.83.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

gix crates.io → 0.83.0

cargo
cargo update -p gix --precise 0.83.0

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Attack vector
Local
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
Passive
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
High
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None
Exploit maturity
Not defined
Scope
X

CVSS 3.1 7.8

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

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

How to prevent it
  • Architecture and Design: If at all possible, use library calls rather than external processes to recreate the desired functionality.
  • Implementation: If possible, ensure that all external commands called from the program are statically created.
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • Operation: Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
  • System Configuration: Assign permissions that prevent the user from accessing/opening privileged files.

References

Timeline

  1. Published
  2. Withdrawn
  3. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-q54r-jf2p-rfr2
gitoxide gix: untrusted .git/config disables filesystem .git-protection path checks via unfiltered protect_options()
High Also affects gix
GHSA-fr8x-3vfx-f45h
gix and gitoxide: unvalidated submodule name traverses out of .git/modules and redirects state() / open() to another repository
High Also affects gix
GHSA-pg4w-g64p-qwhj
gix and gitoxide's symlinked .gitmodules are followed and parsed from outside of the repository
High Also affects gix
GHSA-f26g-jm89-4g65
gitoxide: CommandForbiddenInModulesConfiguration Bypass in gix_submodule::File::update() Enables Arbitrary Command Execution via .gitmodules
High Also affects gix
GHSA-p3hw-mv63-rf9w
gix's submodule name validation bypass + trust inheritance flaw enables path traversal and credential disclosure
High Also affects gix
GHSA-2frx-2596-x5r6
gitoxide does not detect SHA-1 collision attacks
Medium Also affects gix
GHSA-7w47-3wg8-547c
gix traversal outside working tree enables arbitrary code execution
High Also affects gix
GHSA-49jc-r788-3fc9
gix refs and paths with reserved Windows device names access the devices
Medium Also affects gix
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor