Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade vim/vim to version 9.1.1947 or higher.
Affected versions of this package are vulnerable to Uncontrolled Search Path Element when using cmd.exe as a shell for resolving external commands while using tools like grep with :! or
compiler :make commands. An attacker can execute arbitrary code by placing a malicious executable in the same directory as the file being edited, which is then inadvertently run when certain commands or tools are invoked.
Note:
This issue affects only Windows OS.
folder1. Put some text files in this folder.C:\Windows\System32\calc.exe and place it in folder1, changing its name to findstr.exe. (Instead of calc.exe you could use any other executable that produces a noticable effect. In a real-world attack, the attacker would plant an executable that seems outwardly to behave like findstr but surreptitiously performs malicious actions.)folder1 using either Vim or gVim.grep command in Vim, for example: :grep "a" *.txt