All reports
High

vim/neovim: ': source!' command allows arbitrary command execution via modelines

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2019-12735

Probability of exploitation in the next 30 days: 18.96%

FIRST EPSS · 2026-11-20

Description

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.

It was found that the :source! command was not restricted by the sandbox mode. If modeline was explicitly enabled, opening a specially crafted text file in vim could result in arbitrary command execution.