Vim for Windows Vulnerability Let Attackers Execute Arbitrary Code
A critical security vulnerability has been identified in Vim for Windows, potentially allowing attackers to execute arbitrary code on affected systems. This vulnerability, designated as CVE-2025-66476, impacts Vim versions prior to 9.1.1947 and carries a…
A critical security vulnerability has been identified in Vim for Windows, potentially allowing attackers to execute arbitrary code on affected systems. This vulnerability, designated as CVE-2025-66476, impacts Vim versions prior to 9.1.1947 and carries a high severity rating, with a CVSS score of 7.8.
The vulnerability is rooted in the method Vim uses to locate external programs on Windows systems. Specifically, Vim searches the current working directory for required executables before checking system directories. This sequence allows attackers to introduce malicious files, such as a rogue executable named findstr.exe , into a project folder. When a user runs a command like :grep or :make , Vim may execute the malicious file instead of the legitimate system file.
CVE ID: CVE-2025-66476 Package: Vim for Windows Vulnerability Type: Uncontrolled Search Path Element (CWE-427) Severity: High CVSS Score: 7.8 CVSS Vector: AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
A critical security vulnerability has been identified in Vim for Windows, potentially allowing attackers to execute arbitrary code on affected systems.
This vulnerability allows attackers to execute arbitrary code with the same privileges as the user running Vim. It is particularly dangerous in common development environments where users might open files from untrusted sources. Routine actions such as searching through code or running build tools could trigger the execution of malicious code.
All Windows users running Vim version 9.1.1946 or earlier are affected, including those using gVim. It is crucial for users to update Vim to version 9.1.1947 or later to mitigate this vulnerability. The update modifies how Vim searches for external executables, eliminating the prioritization of files in the current working directory.
Maintaining up-to-date development tools and exercising caution when accessing files from uncertain sources are essential practices to prevent exploitation.
Based on reporting by Cyber Security News.
