Description
Vim is an open source, command line text editor. Prior to version 9.2.0276, a modeline sandbox bypass in Vim allows arbitrary OS command execution when a user opens a crafted file. The `complete`, `guitabtooltip` and `printheader` options are missing the `P_MLE` flag, allowing a modeline to be executed. Additionally, the `mapset()` function lacks a `check_secure()` call, allowing it to be abused from sandboxed expressions. Commit 9.2.0276 fixes the issue.
Problem types
CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Product status
References
www.openwall.com/lists/oss-security/2026/04/01/1
github.com/vim/vim/security/advisories/GHSA-8h6p-m6gr-mpw9
github.com/vim/vim/commit/75661a66a1db1e1f3f1245c615
github.com/vim/vim/releases/tag/v9.2.0276