CVE-2025-66476
7.8Vim · Vim
An uncontrolled search path vulnerability in Vim for Windows allows for the execution of malicious files located in the current working directory when invoking external commands.
Executive summary
Vim for Windows versions prior to 9.1.1947 are vulnerable to arbitrary command execution via an uncontrolled search path flaw that can be triggered when opening files in untrusted directories.
Vulnerability
This is an uncontrolled search path element vulnerability (CWE-427) where the application resolves external commands by searching the current working directory before system paths. This allows an unauthenticated attacker to execute arbitrary code if a malicious executable is placed in the same directory as a file being edited.
Business impact
Successful exploitation permits an attacker to execute arbitrary code on the host machine with the privileges of the user running Vim. Given the CVSS score of 7.8, this represents a high risk to organizational security, as it could lead to full system compromise, lateral movement within the network, and unauthorized access to sensitive local data.
Remediation
Immediate Action: Update Vim for Windows to version 9.1.1947 or later, which resolves the search path resolution order.
Proactive Monitoring: Review system logs for unusual process executions originating from the Vim application or unexpected command-line activity initiated by the editor.
Compensating Controls: Avoid opening files from untrusted or shared directories where an attacker could plant malicious executables. Ensure that file system permissions are strictly enforced on directories containing sensitive project files.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
The severity of this vulnerability necessitates immediate action, particularly for environments where users frequently interact with files from external or untrusted sources. Organizations should prioritize patching all Windows-based installations of Vim to version 9.1.1947 to eliminate the risk of arbitrary code execution via this search path manipulation.