
VFS for Git ab95cf51 - उच्च - रिमोट - RCE - core.virtualfilesystem single-quote wrap
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · vfs-quote-breakout
Class: RCE Reach: Remote
VFS for Git master ab95cf51 (tag v2.0.26259.1) - Microsoft
CloneVerb.GetCloneRoot अंतिम URL पथ खंड को डिफ़ॉल्ट enlistment फ़ोल्डर के रूप में लेता है और quote को हटाता नहीं है। RequiredGitConfig फिर core.virtualfilesystem को naive single-quoted hook path के रूप में लिखता है। microsoft/git उस मान को use_shell=1 के साथ चलाता है। product comment तो bash का नाम भी लेता है।
एक clone URL जिसका अंतिम खंड pwn';witness;' है, 'C:/temp/pwn';witness;'/src/.git/hooks/GVFS.VirtualFileSystemHook.exe' बन जाता है। bash तीन commands देखता है। बीच वाला उस user के रूप में चलता है जिसने clone किया।
| ID | अभी कोई CVE नहीं |
| Class | RCE (core.virtualfilesystem का single-quote wrap) |
| Reach | Remote (attacker URL का UI:R clone, या crafted dir के अंतर्गत local git worktree add) |
| CWE | CWE-78, CWE-116 |
| CVSS | High: 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Product | VFS for Git (microsoft/git चाहिए) |
| Affected | master ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3a (tag v2.0.26259.1)। केवल Windows। |
| Auth | Victim attacker URL clone करता है (या crafted dir के अंतर्गत git worktree add) |
| License | GNU Affero GPL v3.0 |
| Lab | केवल 127.0.0.1। how=gadget (कोई Windows VM / live ProjFS नहीं)। |
उस user के रूप में host code जिसने clone किया या git चलाया। SYSTEM नहीं। Unauthenticated RCE नहीं जो "victim इस URL को clone करता है" को छोड़ दे।
| Privilege | Method / sink | क्या देता है | Recon / integrity / availability | Lab-proven या inferred |
|---|---|---|---|---|
| Enlistment फ़ोल्डर नाम चुनना | बिना dest के gvfs clone <url> का अंतिम पथ खंड (CloneVerb.GetCloneRoot) | Directory नाम attacker-chosen है। Windows ' और ; की अनुमति देता है | dest path की integrity | copied dest helper पर Lab-proven। URL .../pwn';witness;' बनता है C:\temp\pwn';witness;' |
core.virtualfilesystem से बाहर निकलना | RequiredGitConfig wrap "'" + ConvertPathToGitFormat(hook) + "'" | Config मान तीन shell tokens है, एक path नहीं | git config की integrity | Lab-proven। Wrap है 'C:/temp/pwn';witness;'/src/.git/hooks/GVFS.VirtualFileSystemHook.exe' |
| cloner के रूप में अतिरिक्त shell command चलाना | microsoft/git virtualfilesystem.c use_shell=1 (config मान का bash -c) | cloner UID के रूप में arbitrary host command | cloner session की integrity / availability | gadget पर Lab-proven। witness ने VFS-VFS-QUOTE-WITNESS लिखा। पहला और तीसरा token missing paths हैं (rc 127) |
| worktree पर वही wrap | Program.Worktree.cs -c core.virtualfilesystem="'<path>'" | clone URL के बिना वही breakout | Integrity | pin source से inferred। निष्पादित नहीं |
बाद के git status / mount पर दोहराव | InProcessMount.TrySetRequiredGitConfigSettings wrap को फिर से लागू करता है | बाद वाला git भी hostile मान को shell करता है | Integrity | Inferred। निष्पादित नहीं |
इस leftover पर बंद: live ProjFS / Microsoft git / gvfs clone (यह host macOS है; how=gadget)। SYSTEM। Unauthenticated RCE जो "victim इस URL को clone करता है" को छोड़ दे। ऐसा dest जिसके नाम में ' नहीं है, और वही hostile path '\'' के साथ wrapped, witness नहीं चलाते।
वही pin leftovers: vfs-mount-dehydrate, vfs-clone-acl, vfs-service-sid, vfs-hook-impersonate, vfs-install-cwd।
मैंने 2026-09-28 merge के बाद VFS for Git master ab95cf51 pin किया। Microsoft नए deployments के लिए Scalar की सिफ़ारिश करता है। Tree अभी भी v2.0.26259.1 tagged है। Skip list CVE-2021-47874 है (इस pin पर quoted binPath)। दस hunts। ProjFS hydration, GPRE parsers, cache URLs, FastFetch, और gvfs upgrade इस bar में खाली लौटे।
फिर मैं RequiredGitConfig पर बैठा। Comment bash को document करता है। Wrap ' को escape नहीं करता। CloneVerb अंतिम URL खंड को dest के रूप में उपयोग करता है। वही leftover है।
पहले से दर्ज wrong turns: बिना quote वाले dest को bug मानना (यह नहीं है); SYSTEM का दावा; एक reverse shell। Theatre। Native Windows अनुपलब्ध था, इसलिए lab उस wrap का gadget है plus bash -c।
python3 vfs-quote-breakout-Abraxas-Labs.py
या
cd lab
./run.sh
Gadget HTTP 127.0.0.1:19630 पर। wrap और dest helpers की प्रतिलिपि बनाता है, फिर /bin/bash -c जिसका PATH एक witness helper तक सीमित है जो oracle लिखता है। Native Windows VM उपलब्ध नहीं था। अंतिम पंक्ति how=gadget का उपयोग करती है।
SUCCESS vfs-quote-breakout how=gadget who=cloner naive-breakout=yes escaped-hold=yes VFS-VFS-QUOTE-WITNESS
Wrap करने से पहले ' को '\'' के रूप में escape करें, या use_shell का उपयोग बंद करें और hook को argv[0] के रूप में पास करें। ऐसे clone और worktree paths को अस्वीकार करें जिनमें ' हो।
ab95cf51d6ffd0ee0e2feae7180078fe9ecbbb3a (tag v2.0.26259.1)CloneVerb.cs default destRequiredGitConfig.cs wrap जो ' को escape नहीं करताvirtualfilesystem.c use_shell=1ImagePathGNU Affero GPL v3.0। देखें LICENSE। केवल Loopback lab। कोई warranty नहीं।