CVE-2025-24890
Rust vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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).

Exploitation steps

  1. Setup (limited user): On a shared Windows system, as a limited user, initialize a Git repository in a location accessible to administrators, such as C:\Users\Public\unsafe-repo or the root of the system drive (C:\).
  2. Configure malicious payload: Add a remote and set 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.
  3. Wait for administrator interaction: The administrator must run a gitoxide-based tool (e.g., gix fetch) with an unfiltered elevated token (UAC-elevated PowerShell, or UAC disabled) from within or beneath the attacker-controlled repository path.
  4. Trigger execution: When the administrator runs 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.
  5. System-drive variant: If 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).

Indicators of compromise

  • File System: Presence of a .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.
  • Logs: Windows Security event logs showing process creation (Event ID 4688) of unexpected child processes (e.g., calc.exe, cmd.exe, powershell.exe) spawned by a gix or gitoxide-based process running under an elevated administrator token.
  • Process: Unusual child processes of gitoxide binaries (gix.exe) such as shells, scripting engines, or network tools, especially when run from directories not typically associated with Git repositories.
  • Network: Outbound SSH or other network connections initiated by processes spawned from gitoxide commands to unexpected hosts (GitHub Advisory).

Mitigation and workarounds

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).

Community reactions

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).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-24890MEDIUM6.8
  • Rust logoRust
  • cargo-c
NoYesSep 09, 2026
CVE-2026-53956MEDIUM5.4
  • Python logoPython
  • py-rattler
NoYesSep 09, 2026
RUSTSEC-2026-0282NONEN/A
  • Rust logoRust
  • aligned_box
NoYesSep 09, 2026
RUSTSEC-2026-0281NONEN/A
  • Rust logoRust
  • greentic-setup
NoYesSep 07, 2026
RUSTSEC-2026-0280NONEN/A
  • Rust logoRust
  • greentic-setup-dev
NoYesSep 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management