CVE-2024-35186
High · 8.8CVSS
8.8
EPSS
0.8%
Published
May 23, 2024
CISA due date
—
Cloudanix analysis
A bug in a Rust-based Git tool lets attackers create files in unexpected places on your computer when you clone a specially made repository.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
During checkout, gix-worktree-state fails to verify that repository paths resolve inside the intended working tree, enabling a malicious repository to write files to arbitrary writable locations on the filesystem when cloned.
Why it matters to the business
Organizations using the affected Git implementation face risk of unauthorized file creation outside project directories, which can corrupt system files, overwrite configuration, or disrupt operations when developers or automated processes clone untrusted repositories.
How an attack unfolds
An attacker crafts a repository containing path traversal sequences in tree objects. A victim clones the repository using the vulnerable client, triggering checkout that writes attacker-controlled files to locations outside the working tree without code execution.
How to fix it
Upgrade byron/gitoxide to version 0.36.0 or later, which includes the fix at commit 4f98e94e0e8b79ed2899b35bef40f3c30b3025b0. Avoid cloning untrusted repositories until patched.
How to confirm the fix worked
Confirm the installed gitoxide version reports 0.36.0 or newer; test cloning a repository containing path traversal entries and verify no files appear outside the intended working tree.
Typical attack path
- Attacker prepares a malicious Git repository embedding path traversal sequences
- Victim clones the repository with the vulnerable gitoxide client
- Client performs checkout without validating resolved paths against the working tree
- Files are written to arbitrary writable locations on the host filesystem
How to detect it
Review clone and checkout logs for unexpected file creation events outside project directories; monitor filesystem activity during git operations for writes to paths containing traversal sequences.
What your security team should do
- Immediately update all gitoxide installations to the patched version
- Scan build and CI systems for use of gitoxide and enforce version pinning
- Educate developers on risks of cloning untrusted repositories until patches are applied
The record
gitoxide is a pure Rust implementation of Git. During checkout, `gix-worktree-state` does not verify that paths point to locations in the working tree. A specially crafted repository can, when cloned, place new files anywhere writable by the application. This vulnerability leads to a major loss of confidentiality, integrity, and availability, but creating files outside a working tree without attempting to execute code can directly impact integrity as well. This vulnerability has been patched in version(s) 0.36.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | gitoxide | 0 | 0.36.0 |
| crates.io | gitoxide-core | 0 | 0.38.0 |
| crates.io | gix | 0 | 0.63.0 |
| crates.io | gix-fs | 0 | 0.11.0 |
| crates.io | gix-fs | 0.0.0-0 | 0.11.0 |
| crates.io | gix-index | 0 | 0.33.0 |
| crates.io | gix-index | 0.0.0-0 | 0.33.0 |
| crates.io | gix-worktree | 0 | 0.34.0 |
| crates.io | gix-worktree | 0.0.0-0 | 0.34.0 |
| crates.io | gix-worktree-state | 0 | 0.11.0 |
| Chainguard | cargo-audit | 0 | 0.21.2-r1 |
| Chainguard | cargo-audit-doc | 0 | 0.21.2-r1 |
| Debian:13 | rust-gix-fs | 0 | No fix |
| Debian:13 | rust-gix-index | 0 | No fix |
| Debian:13 | rust-gix-index | 0 | 0.33.1-1 |
| Debian:13 | rust-gix-worktree | 0 | No fix |
| Ubuntu:24.04:LTS | rust-gix-fs | 0 | No fix |
| Ubuntu:24.10 | rust-gix-fs | 0 | No fix |
| Ubuntu:24.10 | rust-gix-index | 0 | No fix |
| Ubuntu:24.10 | rust-gix-worktree | 0 | No fix |
| Wolfi | cargo-audit | 0 | 0.21.2-r1 |
| Wolfi | cargo-audit-doc | 0 | 0.21.2-r1 |
| openSUSE:Tumbleweed | gitoxide | 0 | 0.36.0-1.1 |
Related vulnerabilities
- GHSA-fr8x-3vfx-f45h gix and gitoxide: unvalidated submodule name traverses out of .git/modules and redirects… Also affects gitoxide
- GHSA-pg4w-g64p-qwhj gix and gitoxide's symlinked .gitmodules are followed and parsed from outside of the… Also affects gitoxide
- GHSA-f26g-jm89-4g65 gitoxide: CommandForbiddenInModulesConfiguration Bypass in gix_submodule::File::update()… Also affects gix
- GHSA-p3hw-mv63-rf9w gix's submodule name validation bypass + trust inheritance flaw enables path traversal… Also affects gix
- CVE-2026-44471 gitoxide is an implementation of git written in Rust. Also affects gix-fs
- GHSA-f89h-2fjh-2r9q gix-fs: Symlink prefix-reuse allows worktree escape during checkout Also affects gix-fs
- CVE-2026-31812 Quinn is a pure-Rust, async-compatible implementation of the IETF QUIC transport protocol. Also affects cargo-audit
- CVE-2026-25727 time provides date and time handling in Rust. Also affects cargo-audit