CVE-2026-82251 — Vulnerability in gitoxide — CVE Details
gix and gitoxide: unvalidated submodule name traverses out of .git/modules and redirects state() / open() to another repository
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.52%). Schedule for your next planned update.
Does your project use an affected gitoxide version?
Paste your Cargo.lock to check it for CVE-2026-82251 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published May 5, 2026 (205 days ago).
- Last revised September 10, 2026 — 127 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p gitoxide --precise 0.52.1
cargo update -p gix --precise 0.83.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: crates.io (2).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
References
Frequently Asked Questions
- What is CVE-2026-82251?
- gix and gitoxide: unvalidated submodule name traverses out of .git/modules and redirects state() / open() to another repository. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2026-82251?
- CVE-2026-82251 affects gitoxide and gix. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-82251 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 37.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2024-35186HIGH
gix traversal outside working tree enables arbitrary code execution
- CVE-2026-40034HIGH
gitoxide: CommandForbiddenInModulesConfiguration Bypass in gix_submodule::File::update() Enables Arbitrary Command Execution via .gitmodules
- CVE-2026-82253HIGH
gix's submodule name validation bypass + trust inheritance flaw enables path traversal and credential disclosure
- CVE-2026-82252HIGH
gix and gitoxide's symlinked .gitmodules are followed and parsed from outside of the repository
- CVE-2025-31130MEDIUM
gitoxide does not detect SHA-1 collision attacks
- CVE-2024-35197MEDIUM
gix refs and paths with reserved Windows device names access the devices
- CVE-2024-32884MEDIUM
gix-transport indirect code execution via malicious username