diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim index f4848d1c60..9723898d15 100644 --- a/runtime/ftplugin/cucumber.vim +++ b/runtime/ftplugin/cucumber.vim @@ -2,6 +2,8 @@ " Language: Cucumber " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2026 May 26 by Vim Project: prevent Code Injection +" https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -96,7 +98,8 @@ function! s:stepmatch(receiver,target) catch endtry if has("ruby") && pattern !~ '\\\@ s:steps -> s:stepmatch on every discovered step, + " including the malicious one. Suppress preview and error messages. + silent! normal [d + call assert_false(filereadable(marker), 'Ruby injection executed') + bwipe! + filetype plugin off +endfunc + " vim: shiftwidth=2 sts=2 expandtab