(0Day) Microsoft Visual Studio VsDevCmd Uncontrolled Search Path Element Remote Code Execution Vulnerability
The VsDevCmd.bat script in Microsoft Visual Studio launches an executable from an unsecured location, so a file placed there can be run instead of the intended program. An attacker could use this to run arbitrary code with the rights of the current user, though the target must first visit a malicious page or open a malicious file.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Microsoft Visual Studio. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the batch script resolves an executable through a search path that includes a directory writable by unprivileged users, so a planted file is executed.
Impact
An attacker could execute arbitrary code in the context of the current user, but exploitation requires the target to visit a malicious page or open a malicious file.
What the attacker needed
Victim opens a malicious file or page; attacker can place a file in the search path
The fix
The vendor stated the reported behaviour was not a vulnerability, so no fix is described; the advisory suggests restricting interaction with the product as the only mitigation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some programs look for helper files in folders that ordinary users can write to. If an attacker can drop a file with the right name into such a folder, the program may run the attacker's file instead of the real one. Here a Visual Studio setup script does this, so a planted program could run with the victim's permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.