CVE-2026-47162
Vim · Vim
A Vimscript code injection vulnerability exists in the netrw plugin, allowing arbitrary command execution via crafted directory names.
Executive summary
A critical code injection vulnerability in the Vim text editor allows attackers to execute arbitrary shell commands through the manipulation of directory paths in the netrw plugin.
Vulnerability
The vulnerability exists in the s:NetrwBookHistSave() function of the netrw plugin. By crafting a specific directory name, an attacker can break out of the string context and execute arbitrary Vimscript, which may include shell commands.
Business impact
With a CVSS score of 8.8, this vulnerability is highly dangerous for developers and system administrators. An attacker can gain control over the user's environment simply by tricking them into browsing a specially crafted directory, potentially leading to unauthorized data access or full system compromise.
Remediation
Immediate Action: Update Vim to version 9.2.0495 or later to address the code injection vulnerability.
Proactive Monitoring: Audit systems for recent usage of the netrw plugin and review history files for suspicious directory naming patterns.
Compensating Controls: Avoid opening untrusted directories or projects using the netrw file explorer until the software has been patched.
Exploitation status
Public Exploit Available: False
Analyst recommendation
Given the ubiquity of Vim in development and server environments, this vulnerability carries significant risk. All users should update their instances immediately to the patched version to mitigate the risk of arbitrary code execution.