CVE-2026-34714
Vim · Vim
Vim is vulnerable to arbitrary code execution when opening a crafted file due to a %{expr} injection flaw in the tabpanel component.
Executive summary
Opening a specially crafted file in Vim versions prior to 9.2.0272 can lead to immediate, unauthenticated code execution on the user's system.
Vulnerability
A flaw exists in the handling of the tabpanel component where the lack of the P_MLE (modeline) flag allows for %{expr} injection. This enables an attacker to embed malicious expressions in a file that are automatically executed by Vim upon opening.
Business impact
This vulnerability poses a significant risk to developers, system administrators, and any users who interact with untrusted files using Vim. A successful exploit allows for arbitrary code execution with the privileges of the user running Vim, potentially leading to full system compromise. The CVSS score of 9.2 reflects the high impact and ease of trigger.
Remediation
Immediate Action: Update Vim to version 9.2.0272 or later immediately through your operating system's package manager or by compiling from source.
Proactive Monitoring: Discourage the opening of files from untrusted sources and monitor for unusual process activity (e.g., shells spawning from Vim) on developer workstations.
Compensating Controls: Disable modelines by adding set nomodeline to your .vimrc file, which can mitigate some forms of expression injection, although updating is the only complete fix.
Exploitation status
Public Exploit Available: No
Analyst recommendation
Updating Vim is a critical security requirement for all users. Given that Vim is often installed by default on nearly all Unix-like systems, organizations should use automated configuration management tools to ensure the patch is applied across the entire fleet.