
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-24890 is a safe.directory protection bypass vulnerability in the gix-sec crate of the gitoxide Rust Git implementation, where processes running with full administrative rights on Windows incorrectly treat all repository locations as trusted. This allows a limited user to configure a repository with malicious commands that are then executed when an elevated administrator interacts with it. Affected versions are gix-sec ≤ 0.13.2; the issue is patched in version 0.13.3. It carries a CVSS v3.1 base score of 6.8 (Medium) (GitHub Advisory).
The root cause is CWE-283 (Unverified Ownership): the is_path_owned_by_current_user function in gix_sec::identity for Windows incorrectly re-examines the running process/thread token instead of the directory's owner when performing the administrator-specific ownership check. Specifically, IsWellKnownSid is called on token_owner (the process/thread owner SID) rather than folder_owner (the directory's owner SID), and CheckTokenMembership is passed a NULL token handle (representing the running thread) rather than checking group membership against the directory owner. Because both checks effectively evaluate the running process rather than the target directory, any directory is considered trusted when the process runs with an unfiltered administrative token, bypassing safe.directory protections entirely. The fix (commit 39e3748) corrects the logic to check folder_owner against the Administrators well-known SID and uses the linked token for split-token (UAC) scenarios (GitHub Advisory, Fix Commit).
A malicious limited user on a shared Windows system can pre-configure a repository (e.g., in C:\Users\Public, the limited user's profile directory, or even C:\) with arbitrary commands via core.sshCommand or other Git hooks, which are then silently executed when an elevated administrator runs a gitoxide-based tool (such as gix fetch) in or near that repository. The impact includes high confidentiality and integrity loss — an attacker can achieve arbitrary code execution in the context of the administrator's elevated session — and low availability impact. The attack is particularly insidious because it can trigger through shell prompts or editor integrations that automatically query repository state, without the administrator realizing they are interacting with another user's repository (GitHub Advisory).
No public exploit code or in-the-wild exploitation has been reported as of the advisory date. The vulnerability requires local access: the attacker must have a limited account on the same Windows machine and must socially engineer or wait for an administrator to run an affected gitoxide-based tool with an unfiltered (elevated) token near the attacker-controlled repository. The advisory includes detailed proof-of-concept steps demonstrating exploitation via gix fetch and core.sshCommand. There is no CISA KEV listing and no EPSS score is currently published (GitHub Advisory).
C:\Users\Public\unsafe-repo or the root of the system drive (C:\).core.sshCommand to execute an arbitrary payload:git init unsafe-repo
cd unsafe-repo
git remote add origin ssh://localhost/repo.git
git config core.sshCommand 'calc.exe; ssh'For the system-drive attack, use -c safe.directory=. to bypass Git's own protections when configuring the repository.gix fetch) with an unfiltered elevated token (UAC-elevated PowerShell, or UAC disabled) from within or beneath the attacker-controlled repository path.gix fetch (or another affected gitoxide command), gix-sec incorrectly trusts the repository, reads the malicious core.sshCommand, and executes the attacker's payload (e.g., calc.exe) in the administrator's elevated context.C:\ is initialized as a repository by the limited user, any gix command run by an elevated administrator anywhere on the C: drive (outside a separate repository) will trigger the payload, unless GIT_CEILING_DIRECTORIES is configured to exclude C:\ (GitHub Advisory)..git directory in unexpected locations such as C:\, C:\Users\Public\, or other shared directories; C:\.git\config or similar files containing core.sshCommand, core.fsmonitor, or other command-execution hooks set to unusual values.calc.exe, cmd.exe, powershell.exe) spawned by a gix or gitoxide-based process running under an elevated administrator token.gix.exe) such as shells, scripting engines, or network tools, especially when run from directories not typically associated with Git repositories.Upgrade gix-sec to version 0.13.3 or later, which corrects the Windows ownership check logic to properly compare the directory owner against the Administrators group SID and handle UAC split-token scenarios (Fix Commit). As a workaround, administrators can avoid running gitoxide-based tools with UAC elevation (i.e., run unelevated when UAC is enabled), which prevents the unfiltered administrative token from being used. Setting GIT_CEILING_DIRECTORIES to exclude sensitive paths (such as the system drive root) can mitigate the system-drive attack variant but does not fully address the vulnerability. Applications embedding gix-sec should also update their dependency to the patched version (GitHub Advisory).
The vulnerability was discovered and reported by researcher EliahKagan and published by maintainer Byron (Sebastian Thiel) in the gitoxide security advisory. No significant broader media coverage or social media discussion has been identified beyond the GitHub advisory and associated commit (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."