cargo package report

Is gix-validate safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so cargo packages are not covered.


      cvss
      0.0
      high

      severity out of 10

      epss
      0.00%
      medium

      chance of exploitation in 30 days, 49th percentile of all CVEs

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-p3hw-mv63-rf9w, the advisory selected below

      // 1 advisories

      GHSA-p3hw-mv63-rf9w

      HIGHCVE-2026-82253
      // summary

      Submodule name validation bypass plus missing validation in production code paths allows path traversal via crafted .gitmodules. Combined with a trust inheritance flaw in Submodule::open(), this enables reading arbitrary git repository configs (including credentials) from traversed paths with full trust (CWE-22, CWE-200).

      // details

      Bug 1: Validation bypass in gix-validate/src/submodule.rs (lines 27-42)

      The name() function uses name.find(b"..") which returns only the FIRST occurrence. If the first .. is embedded in a non-traversal context, the function returns Ok without checking subsequent ../ sequences:

      pub fn name(name: &BStr) -> Result {
          match name.find(b"..") {
              Some(pos) => {
                  let &b = name.get(pos + 2).ok_or(name::Error::ParentComponent)?;
                  if b == b'/' || b == b'\\' {
                      Err(name::Error::ParentComponent)
                  } else {
                      Ok(name)  // Returns Ok without checking rest of string
                  }
              }
              None => Ok(name),
          }
      }

      Bypass: a..b/../../../.git/ passes because find(b"..") returns position 1 (the .. in a..b), checks name[3] == b'b', and returns Ok. The real /../../../ is never checked.

      Bug 2: Validation never called in production

      gixvalidate::submodule::name() has zero production callers (only test code). The names() iterator in gix-submodule/src/access.rs:29 explicitly documents it returns "unvalidated names."

      gitdir() at gix/src/submodule/mod.rs:198-204 constructs filesystem paths from raw names:

      pub fn git_dir(&self) -> PathBuf {
          self.state.repo.common_dir().join("modules").join(gix_path::from_bstr(self.name()))
      }

      Bug 3: Trust inheritance bypass in Submodule::open()

      At gix/src/submodule/mod.rs:270, open() clones the parent repository's options:

      match crate::open_opts(self.git_dir_try_old_form()?, self.state.repo.options.clone()) {

      The parent's options.gitdirtrust is Some(Trust::Full). At gix/src/open/repository.rs:103-104:

      if options.git_dir_trust.is_none() {
          options.git_dir_trust = gix_sec::Trust::from_path_ownership(&git_dir)?.into();
      }

      Since trust is already Some(Full), the ownership check is skipped entirely. The traversed path is opened with Trust::Full regardless of ownership, bypassing gitoxide's safe-directory protections.

      // poc

      Compiled and executed in Rust 1.94.1 --release mode. All bypass cases confirmed:

      BYPASS a..b/../../../.git/           -> PASSED validation
             git_dir = .git/modules/a..b/../../../.git/
             normalized = .git/              (parent repo!)
      
      BYPASS x..y/../../../.git/config     -> PASSED validation
             git_dir = .git/modules/x..y/../../../.git/config
             normalized = .git/config
      // attack chain
      • Attacker crafts a repository with .gitmodules:
         [submodule "x..y/../../.."]
             path = innocent
             url = https://attacker.com/repo.git
      • Victim clones the repository using a tool built on gitoxide.
      • When the tool iterates submodules and calls submodule.open() or submodule.status():
      • gitdir() returns .git/modules/x..y/../../.. which resolves to the parent .git/
      • openopts() is called with Trust::Full (inherited from parent, ownership check skipped)
      • The parent's .git/config is fully parsed
      • The returned Repository object exposes all config values from the traversed path:
      • remote.origin.url (may contain https://user:token@github.com/...)
      • http.extraHeader (often Authorization: Bearer )
      • credential. sections
      • core.sshCommand
      • Accessible via standard API: repo.configsnapshot().string("http.extraHeader"), repo.findremote("origin"), etc.
      // impact

      A crafted .gitmodules in a malicious repository causes gitoxide to open arbitrary git directories as submodule repositories with full trust, exposing their configuration including credentials. This is the same class of vulnerability as GHSA-7w47-3wg8-547c (path traversal), but through the submodule name vector with an additional trust bypass.

      The trust inheritance is the critical amplifier: without it, the traversed path would undergo ownership checks that could block the attack. With it, any git directory reachable via ../ is opened with full trust.

      // honest limitations
      • The traversed path must be a valid git directory (HEAD, objects/, refs/ must exist)
      • The victim's tool must call open() or status() on submodules (tools that only list submodules are not affected)
      • Credential exposure requires the target config to contain embedded credentials
      • Submodule operations currently require explicit user action
      // suggested fix
      • Fix the validation to check ALL .. occurrences (iterate, not single find)
      • Call gixvalidate::submodule::name() in gitdir() before constructing the path
      • Do NOT inherit gitdirtrust from parent when opening submodule repos -- always re-derive trust from path ownership
      // severity

      High. Network vector (via clone), requires user interaction (submodule operations). The trust bypass enables credential disclosure from traversed git directories. Confidentiality impact is high.

      // cvss v4.0 vector

      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

      Attack vector
      Network
      Attack complexity
      Low
      Attack requirements
      None
      Privileges required
      None
      User interaction
      None
      Confidentiality (vulnerable system)
      High
      Integrity (vulnerable system)
      None
      Availability (vulnerable system)
      None
      Confidentiality (subsequent systems)
      None
      Integrity (subsequent systems)
      None
      Availability (subsequent systems)
      None

      Checked 2026-09-27 at 21:36 UTC. The most recent advisory here was published 2026-05-05. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.