CVE-2025-66476 Vim for Windows Uncontrolled Search Path Element Remote Code Execution Vulnerability
Attackers can execute arbitrary code on Windows by placing malicious executables in the current working directory, exploiting Vim's path resolution order.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2025-66476?
CVE-2025-66476 is a high-severity path traversal vulnerability in Vim Vim, published on 2 Dec 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Vim is an open source, command line text editor. Prior to version 9.1.1947, an uncontrolled search path vulnerability on Windows allows Vim to execute malicious executables placed in the current working directory for the current edited file. On Windows, when using cmd.exe as a shell, Vim resolves external commands by searching the current working directory before system paths. When Vim invokes tools such as findstr for :grep, external commands or filters via :!, or compiler/:make commands, it may inadvertently run a malicious executable present in the same directory as the file being edited. The issue affects Vim for Windows prior to version 9.1.1947.
Weakness: CWE-427
Which versions are affected by CVE-2025-66476?
It affects 1 product.
Products include Vim Vim.
How do I fix CVE-2025-66476?
No fix has been published for CVE-2025-66476 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-66476 being exploited?
There is no known exploitation of CVE-2025-66476 in the wild and no public exploit code.
Other vulnerabilities in Vim Vim
Sources
Also known as GHSA-g77q-xrww-p834.