(Vim 9.2.0405 before 9.2.1352 contains a security bypass vulnerability ...)
Windows: jobstart() and system() run executables from cwd in Vim < 9.2.1421 ============================================================================ Date: 28.11.2026 Severity: Medium CVE: requested, not yet assigned CWE: Uncontrolled Search Path Element (CWE-427)
Summary
On Windows, Vim may execute a program from the current directory instead of the intended system program, when a script or plugin starts it using jobstart(), termstart() or system() with a List argument. This is a follow-up to GHSA-g77q-xrww-p834.
Description
Patch v9.1.1947 fixed GHSA-g77q-xrww-p834 by setting the $NoDefaultCurrentDirectoryInExePath environment variable before running external commands through the shell, so that cmd.exe no longer searches the current directory for executables.
However, jobstart(), termstart() (using ConPTY) and, since patch v9.2.0025, system() and systemlist() with a List argument do not use the shell, but call CreateProcessW() directly. The environment variable was not set for these calls, so CreateProcessW() still searched the current directory before the system directories and $PATH.
An attacker could place a trojanized executable with a common name (e.g. git.exe) in a project folder. It would run when the user opens a file there and a plugin starts that program by its name, e.g. a Git integration, a language server client or a linter.
Impact
Arbitrary code execution with the privileges of the user running Vim.
Exploitation requires: - Vim running on Windows - the current directory set to an attacker-controlled directory, e.g. a cloned repository, by starting Vim there, by :cd, :lcd or :tcd, or by opening a file from Windows Explorer - a script or plugin that starts an external program by its name using jobstart(), termstart() or system() with a List argument
Since this requires a script or plugin that starts external programs by their name and the user working in an attacker-controlled directory, the severity is rated medium.
Acknowledgements
The Vim project would like to thank Mark Woods for reporting the issue.
References
The issue has been fixed as of Vim patch v9.2.1421.
- Commit - Github Security Advisory - Related: GHSA-g77q-xrww-p834
Best, Christian -- Wie man sein Kind nicht nennen sollte: Bred R. Zaun
Vim is an open source, command line text editor. From 9.2.0320 until 9.2.0679, a crafted undo or swap file can store a virtual-text property whose offset and length point outside the line's property data. When Vim restores or displays such a line it converts the offset into a pointer and reads the virtual text without bounds checking, causing an out-of-bounds read that can crash Vim or disclose adjacent heap memory. This vulnerability is fixed in 9.2.0679.
Vim is an open source, command line text editor. From 9.2.0320 until 9.2.0679, a crafted undo or swap file can store a virtual-text property whose offset and length point outside the line's property data. When Vim restores or displays such a line it converts the offset into a pointer and reads the virtual text without bounds checking, causing an out-of-bounds read that can crash Vim or disclose adjacent heap memory. This vulnerability is fixed in 9.2.0679.
Vim 9.2.0405 before 9.2.1352 contains a security bypass vulnerability in expandtagfname() that allows attackers to evade 'tagsecure' URL checks by escaping URLs in tags file entries. Attackers can supply a crafted tags file in a cloned repository so that jumping to a tag makes netrw fetch an attacker-controlled URL leaking environment variable values.
Vim 9.2.0405 before 9.2.1352 contains a security bypass vulnerability in expandtagfname() that allows attackers to evade 'tagsecure' URL checks by escaping URLs in tags file entries. Attackers can supply a crafted tags file in a cloned repository so that jumping to a tag makes netrw fetch an attacker-controlled URL leaking environment variable values.
A flaw was found in Vim's netrw plugin. A crafted filename containing quote characters and expression fragments can break out of the quoted context during mark/unmark operations, allowing arbitrary Vimscript execution. This can be leveraged to run shell commands with the privileges of the user running Vim.
Vim is an open source, command line text editor. Prior to 9.2.0841, propaddone() in src/textprop.c uses the proplen value from gettextprops() to increment a uint16t property count beyond 0xffff, wrapping the count to zero and copying existing text-property records into a heap allocation sized for none of them. This issue is fixed in version 9.2.0841.
Vim is an open source, command line text editor. Prior to 9.2.0847, runtime/autoload/vimball.vim allows a crafted vimball member named .VimballRecord to overwrite the installation record with attacker-chosen commands. When vimball#RmVimball() later processes the matching record entry, the stored Ex commands, including operating-system commands invoked through :!, execute with the privileges of the user running Vim. This issue is fixed in version 9.2.0847.
Vim is an open source, command line text editor. Prior to 9.2.0846, setsofo() in src/spellfile.c reuses slsalfirst[] without resetting values left by setsalfirst(), so a crafted spell file containing an SNSAL section before an SNSOFO section causes under-counted mapping lists and attacker-influenced writes beyond a heap allocation. This issue is fixed in version 9.2.0846.
Vim is an open source, command line text editor. From 9.2.0511 until 9.2.0844, jsondecodeitem() in src/json.c can retain a stale pointer after jsondecodestring() invokes channelfill() to refill and free the current buffer, causing the error path to read freed memory instead of reader->jsbuf + reader->jsused when an invalid JSON string spans buffers. This issue is fixed in version 9.2.0844.
Vim is an open source, command line text editor. Prior to 9.2.0840, runtime/plugin/netrwPlugin.vim loads netrw and runtime/pack/dist/opt/netrw/autoload/netrw.vim constructs Bookmarks, History, and Targets menu entries by interpolating attacker-controlled directory paths into executed :menu commands. s:NetrwBookmarkMenu(), s:NetrwTgtMenu(), g:netrwmenuescape, EXTRLBAR, and netrw#MakeTgt() fail to neutralize the | command separator or single quotes at five construction sites, allowing a crafted path browsed or bookmarked in GUI Vim to execute arbitrary Ex and operating-system commands. This issue is fixed in version 9.2.0840.
Vim is an open source, command line text editor. Prior to 9.2.0839, the runtime/ftplugin/sh.vim, runtime/ftplugin/zsh.vim, and runtime/ftplugin/ps1.vim filetype plugins pass attacker-controlled Visual-mode selections from K through keywordprg commands without safely separating shell arguments. fnameescape() and PATHESCCHARS do not neutralize shell metacharacters before ShKeywordPrg, ZshKeywordPrg, or GetHelp invokes bash, zsh, or PowerShell, allowing arbitrary operating-system commands to execute with the privileges of the user running Vim. This issue is fixed in version 9.2.0839.
Last updated 9 September 2026
Last updated 2 July 2026
Last updated 13 July 2026
Last updated 13 July 2026
Last updated 13 July 2026
Last updated 2 July 2026
Last updated 2 July 2026
Last updated 2 July 2026
Last updated 2 July 2026
Last updated 2 July 2026
Last updated 2 July 2026
Last updated 9 June 2026
Last updated 19 June 2026
Last updated 19 June 2026
Last updated 19 June 2026
Vim Ex command injection in Vims NetBeans integration
Last updated 19 June 2026