GHSA-fr8x-3vfx-f45h — gitoxide
GHSA-fr8x-3vfx-f45h is a Path Traversal vulnerability in gitoxide. A fix is available for gitoxide — see the affected versions and patch details below.
gix and gitoxide: unvalidated submodule name traverses out of .git/modules and redirects state() / open() to another repository
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fr8x-3vfx-f45h.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
gitoxide🦀gixReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Summary
attachments: pocs.zip
Submodule names coming from .gitmodules are exposed as unvalidated names and are later reused to derive the submodule git directory as:
<superproject common_dir>/modules/<submodule name>
Because the submodule name is joined directly as a filesystem path component, a name such as ../../../escaped-target.git escapes .git/modules after normalization. The current implementation then uses that escaped path in both state() and open().
The updated PoC demonstrates the real sink, not just string construction:
state()reportsrepository_exists=truefor the traversed path;open()returns a repository whose normalizedcommon_dir()matches the attacker-chosen repository outside.git/modules.
Root cause analysis
The relevant flow is:
gix-submodule/src/access.rsexposes unvalidated submodule names from configuration.gix/src/submodule/mod.rsderives the git directory by doingcommon_dir().join("modules").join(name)with no confinement check.gix/src/submodule/mod.rsuses that derived path during state resolution and repository opening.
There is no normalization-and-confinement step between “submodule name from configuration” and “filesystem path used for repository existence checks / open.” As a result, traversal segments in the submodule name directly influence which repository path is inspected and opened.
Reproduce steps
Use the attached PoC zip that contains the pocs/ workspace.
-
Unzip the PoC archive.
-
Enter
pocs/F002. -
Run:
cargo run --quiet -
Compare the output with
pocs/F002/result.txt.
Key outputs are:
submodule_name=../../../escaped-target.gitderived_git_dir_raw=.../.git/modules/../../../escaped-target.gitderived_git_dir_normalized=.../artifacts/escaped-target.gitescaped_target=.../artifacts/escaped-target.gitrepository_exists=truesubmodule_opened=trueopened_common_dir_normalized=.../artifacts/escaped-target.gitnormalized_git_dir_matches_target=trueopened_common_dir_matches_target=truetarget_outside_modules_root=true
These outputs show that gitoxide is not only constructing a traversable path string. It is actually using the escaped path for repository existence checks and for opening a repository object.
Impact
Confirmed impact:
- a malicious submodule name can redirect submodule state inspection away from
.git/modules/<name>to an attacker-chosen repository path outside.git/modules; Submodule::state()can report repository existence for the wrong repository;Submodule::open()can return a repository object backed by that attacker-chosen path.
This is best described as a path-traversal / repository-confusion issue in submodule repository resolution.
This report does not claim command execution from this behavior alone. The demonstrated impact is repository redirection: callers that enumerate, inspect, or operate on submodules can be steered into using the wrong repository.
Recommended fix
Two complementary fixes are advisable:
- do not reuse raw submodule names as filesystem path fragments;
- either use a validated/sanitized name for filesystem derivation,
- or derive the storage path from a safe identifier instead of the user-controlled name;
- add an explicit confinement check after path derivation;
- normalize or canonicalize the candidate path,
- verify that the result stays under
<common_dir>/modules, - reject names that contain traversal segments, path separators, or any representation that can escape the modules root.
In short, submodule names may remain opaque configuration identifiers, but they should not be treated as trusted filesystem subpaths.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | gitoxide | all versions | 0.52.1cargo update -p gitoxide --precise 0.52.1 |
| 🦀crates.io | gix | all versions | 0.83.0cargo update -p gix --precise 0.83.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gitoxide, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update gitoxide to 0.52.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fr8x-3vfx-f45h is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-fr8x-3vfx-f45h can be triaged on real exposure rather than presence alone.
Tailored to GHSA-fr8x-3vfx-f45h. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-fr8x-3vfx-f45h in your dependencies?
O3 Security finds GHSA-fr8x-3vfx-f45h across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.