Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
vfs-install-cwd — VFS for Git ab95cf51 - High - Local - LPE - installer CWD unqualified gvfs.exe | Kitploit
Tools/GitHubGitHub/abraxas/vfs-install-cwd
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingPapers & ResearchRed Teaming
GitHubabraxas/vfs-install-cwd

vfs-install-cwd

VFS for Git ab95cf51 - High - Local - LPE - installer CWD unqualified gvfs.exe

View Repository
64 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Abraxas Labs - vfs-install-cwd

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  vfs-install-cwd

vfs-install-cwd

Class: LPE Reach: Local

VFS for Git master ab95cf51 (tag v2.0.26259.1) - Microsoft

Setup.iss PrepareToInstall always calls ExecWithResult('gvfs.exe', 'service --list-mounted', '', ...) through {cmd} /S /C with an empty WorkingDir. That inherits the directory from which the admin launched SetupGVFS*.exe. cmd.exe searches CWD then PATH. UnmountRepos uses the same unqualified name.

The same file already qualifies the safe paths. sc.exe is {sys}\SC.EXE. Post-install remount is {app}\gvfs.exe. First install has no real gvfs.exe on PATH yet, so a plant next to the signed installer wins.

IDno CVE yet
ClassLPE (elevated installer CWD search / unqualified exec)
ReachLocal (UI:R)
CWECWE-427, CWE-428
CVSSHigh: 7.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
ProductVFS for Git
Affectedmaster ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3a (tag v2.0.26259.1). Windows only.
AuthLocal. Plant gvfs.exe in the directory from which an admin launches SetupGVFS*.exe.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1 only. how=gadget (no native SetupGVFS*.exe).

Sibling of CVE-2021-47874 (unquoted binPath), different sink. sc.exe and the remount path on this pin are already qualified.

What an attacker can do

Plant a benign gvfs.exe next to the signed installer. When an admin launches setup from that folder, PrepareToInstall runs the plant as the elevated installer.

PrivilegeMethod / sinkWhat it grantsRecon / integrity / availabilityLab-proven or inferred
Inherit installer CWDExecWithResult empty WorkingDir (Setup.iss ~830)Search starts in the launch folderIntegrity of search orderLab-proven. Gadget working_dir="", search cwd-then-path.
Resolve unqualified gvfs.exe from CWD before PATHcmd.exe /S /C ""gvfs.exe" service --list-mounted > ..."Plant wins over PATHIntegrityLab-proven. prepare-resolved=cwd-plant, resolved /lab/cwd/gvfs.exe. PATH copy was not hit.
Run as the elevated installerWitness file owner = gadget uid (stand-in for elevated setup)Admin-equivalent code executionIntegrityLab-proven on the gadget uid. Native admin IL not available on this host.
Same plant on unmountExec('gvfs.exe', 'service --unmount-all', '', ...) (Setup.iss ~544)Plant runs again during unmountIntegrityLab-proven. unmount-resolved=cwd-plant.
Continue setup after the plantPlant exits 0 and writes a canary onlySetup proceedsAvailability of installLab-proven. Witness text is VFS-INSTALL-CWD-WITNESS. No payload.

Closed on this leftover: remount {app}\gvfs.exe (remount-resolved=app, remount-plant=no). Quoted {sys}\SC.EXE (sc-resolved=sys). POSIX PATH-only search (unix-cwd-search=no). Live SetupGVFS*.exe / ProjFS (this host is macOS; how=gadget). Remote unauthenticated exec. Unquoted ImagePath CVE-2021-47874 (already quoted binPath).

Same pin leftovers: vfs-quote-breakout, vfs-mount-dehydrate, vfs-clone-acl, vfs-service-sid, vfs-hook-impersonate.

How I found it

I pinned VFSForGit master ab95cf51 after the 2026-09-28 merge. The skip list is CVE-2021-47874. Setup.iss already quotes binPath and qualifies {sys}\SC.EXE and {app}\gvfs.exe. PrepareToInstall still passes a bare gvfs.exe to cmd.exe.

Wrong turns already recorded: re-filing CVE-2021-47874; treating POSIX PATH-only search as the Windows bug; claiming remount is also unqualified. Theatre. Native Windows was missing, so the lab is a gadget of ExecWithResult plus cmd CWD-then-PATH search.

Lab

python3 vfs-install-cwd-Abraxas-Labs.py

or

cd lab
./run.sh

Gadget HTTP on 127.0.0.1:19680. Witness VFS-INSTALL-CWD-WITNESS. Last line uses how=gadget.

SUCCESS vfs-install-cwd how=gadget prepare-resolved=cwd-plant prepare-witness=yes remount-resolved=app remount-plant=no unix-cwd-search=no VFS-INSTALL-CWD-WITNESS

The fix

ExpandConstant('{app}\gvfs.exe') when present, else skip the list-mounted query on first install. Never pass a bare gvfs.exe to cmd.exe. Qualify UnmountRepos the same way.

References

  • github.com/microsoft/VFSForGit master ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3a
  • Setup.iss PrepareToInstall / UnmountRepos / {sys}\SC.EXE / {app}\gvfs.exe
  • Nearby patched (not this exec): CVE-2021-47874 unquoted ImagePath
  • CWE-427 · CWE-428

License

GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.

Download Tool