JLSEC-2026-1882: Code Injection
Vim is an open source, command line text editor. Prior to 9.2.0663, a Vimscript code injection vulnerability exists in s:NetrwLocalRmFile() in the netrw plugin (runtime/pack/dist/opt/netrw/autoload/netrw.vim) when deleting a local file from the browser. A filename derived from the buffer's directory listing is interpolated into an Ex command line passed to :execute with only the backslash character escaped, allowing a crafted filename containing a bar (|) to terminate the intended command and execute arbitrary Vimscript, including shell commands via :call system() and :!. This vulnerability is fixed in 9.2.0663.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.2.0663
Event History
Frequently Asked Questions
What conditions are required to exploit this issue?
An attacker needs to cause a crafted filename containing a bar character (|) to appear in a local directory listing viewed through netrw. A user must then delete that file from the netrw browser, making this a local attack with required user interaction.
Who is most exposed?
Users who browse and delete files in attacker-controlled or untrusted local directories with Vim's netrw plugin are exposed. The vulnerable operation is deletion of a local file from the netrw browser, not merely opening Vim or viewing arbitrary text files.
What can be done if updating is not immediately possible?
Avoid deleting files through netrw when browsing directories that may contain attacker-controlled filenames. Delete such files using another file-management method instead, particularly when filenames may include a bar character.
How can I determine whether the installed Vim is affected?
Vim versions prior to 9.2.0663 are affected. Check the Vim version in the packaged julia/vim_jll software and determine whether it includes the fix released in Vim 9.2.0663.