CVE-2025-66476: Uncontrolled Search Path Arbitrary Code Execution in Vim for Windows
- Vendor
- Vim
CVE-2025-66476 is a high-severity uncontrolled search path vulnerability in Vim for Windows prior to 9.1.1947. When Vim is configured to use cmd.exe as its shell, external command resolution on Windows may search the current working directory before trusted system paths. As a result, when Vim invokes external utilities such as findstr.exe for :grep, shell commands via :!, filter commands using !, :make/compiler integrations, or other features that call external programs such as system(), it can execute a malicious executable planted in the directory associated with the edited file or current working directory. An attacker can place a trojanized binary with the expected name, such as findstr.exe, in a project folder and cause Vim to run it when the user edits files from that folder or changes into it. The flaw affects Vim for Windows 9.1.1946 and earlier and was fixed in 9.1.1947.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation results in arbitrary code execution in the security context of the user running Vim. This allows an attacker to run attacker-controlled programs without requiring elevated privileges, potentially leading to full compromise of the user's session, execution of follow-on malware, data theft, persistence, or use of the host as a pivot point. The impact is limited to the privileges available to the invoking user, but can still be significant in developer and administrative workflows where Vim is used in sensitive directories.
Mitigation
If you can’t patch tonight, do this now.
Until patching is complete, avoid opening or working in untrusted project directories with Vim on Windows, especially directories where an attacker could place executables. Avoid changing Vim's working directory into untrusted folders using :cd, :lcd, or :tcd. Reduce or avoid use of features that invoke external commands from untrusted locations, including :grep, :!, filter commands, :make, and scripts using system(). Where operationally feasible, configure Vim to use a shell or command invocation method that does not prioritize the current working directory, and monitor for suspicious executables such as trojanized findstr.exe placed in project folders.
Remediation
Patch, then assume compromise.
Upgrade Vim for Windows to version 9.1.1947 or later, which contains the fix for this uncontrolled search path issue. Ensure the patched build is deployed across affected Windows systems, especially developer workstations and administrative endpoints where Vim is used to open files from untrusted or shared directories. Validate that any packaged or embedded Vim distributions are also updated to a fixed version.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2025-66476 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2025-66476 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-66476?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2025-66476.
- Is there a patch for CVE-2025-66476?
- Upgrade Vim for Windows to version 9.1.1947 or later, which contains the fix for this uncontrolled search path issue. Ensure the patched build is deployed across affected Windows systems, especially developer workstations and administrative endpoints where Vim is used to open files from untrusted or shared directories.
- What products are affected by CVE-2025-66476?
- Vim.
- How severe is CVE-2025-66476?
- CVE-2025-66476 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 0.28% (13th percentile) as of Sep 25, 2026.
Recent activity
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.