gitoxide gix-fs versions before 0.23.0 have a path validation bypass vulnerability in the worktree checkout mechanism. This flaw allows attackers to escape the intended worktree directory by manipulating symbolic links during forced checkouts with overwrite_existing enabled. Malicious repository trees can replace validated directories with symlink entries, causing files to be written outside the worktree, potentially enabling code execution or file manipulation.
gitoxide is an implementation of git written in Rust. Prior to 0.21.1, a malicious tree can be constructed that will, when checked out with gitoxide, permit writing an attacker-controlled symlink into any existing directory the user has write access to. During checkout, all symlink index entries are deferred and created after regular files using a single shared gix_worktree::Stack. Internally, this uses a gix_fs::Stack. gix_fs::Stack::make_relative_path_current() caches validated path prefixes: when the previously-processed leaf component exactly matches the leading component(s) of the next path, the leaf-to-directory transition at gix-fs/src/stack.rs invokes only delegate.push_directory(), never delegate.push(). In gix_worktree::stack::delegate::StackDelegate, when the state member is State::CreateDirectoryAndAttributesStack, Attributes::push_directory() only loads attributes (from the ODB, in the clone case), and does not perform any other checks. The on-disk symlink_metadata() check and unlink-on-collision live in StackDelegate::push()'s invocation of create_leading_directory(), which is therefore bypassed for the cached prefix. The final symlink is created with plain std::os::unix::fs::symlink, which follows symlinks in parent directories. Therefore, it's possible to provide a tree with duplicate symlink and directory entries that exploits this. This vulnerability is fixed in 0.21.1.
A path traversal vulnerability in gitoxide allows unvalidated submodule names from .gitmodules to escape the intended .git/modules directory. This causes Submodule::state() and Submodule::open() to operate on attacker-chosen repository paths outside the modules directory. The issue arises because submodule names are directly used as filesystem path components without confinement checks or normalization. This can lead to repository confusion where operations on submodules are redirected to unintended repositories. No direct code execution is claimed, but the impact is significant repository redirection.
gitoxide versions prior to 0.52.1 and 0.83.0 have a vulnerability where the .gitmodules file in the worktree can be a symlink pointing outside the repository. This causes the submodule metadata API to parse and expose attacker-controlled data from outside the repository boundary. The flaw allows injection of arbitrary submodule configuration metadata, misleading downstream workflows that rely on this data. No direct code execution is claimed, but the integrity of submodule metadata is compromised.
gitoxide is an implementation of git written in Rust. Before 0.42.0, gitoxide uses SHA-1 hash implementations without any collision detection, leaving it vulnerable to hash collision attacks.gitoxide uses the sha1_smol or sha1 crate, both of which implement standard SHA-1 without any mitigations for collision attacks. This means that two distinct Git objects with colliding SHA-1 hashes would break the Git object model and integrity checks when used with gitoxide. This vulnerability is fixed in 0.42.0.