Vim Modeline Bypass Enables Arbitrary Command Execution
Vim disclosed a high-severity vulnerability that lets attackers achieve arbitrary OS command execution when a user opens a crafted file in affected versions earlier than 9.2.0276. The flaw is a modeline sandbox bypass caused by missing security-related P_MLE flags on the complete, guitabtooltip, and printheader options, allowing unsafe behavior from modelines that should have been restricted.
The bug also involves a missing check_secure() call in mapset(), which creates additional exploitation paths through key mappings and option handling. Researchers showed that the complete option could abuse F{func} callback syntax without the protections applied to completefunc, while guitabtooltip and printheader could be leveraged through mapset(). Vim fixed the issue in patch v9.2.0276, and the advisory was later assigned CVE-2026-34982; the project credited dfwjj x and Avishay Matayev for the discovery and analysis.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
3 events from the most recent confirmed update back to the earliest known activity.
GitHub advisory assigns CVE-2026-34982 to the Vim flaw
A later GitHub Security Advisory update assigned CVE-2026-34982 to the Vim modeline bypass vulnerability. The project also credited researchers "dfwjj x" and Avishay Matayev for discovering and analyzing the issue.
Vim vulnerability publicly disclosed on oss-sec
On March 31, 2026, Vim publicly disclosed technical details of a modeline sandbox bypass involving the `complete`, `guitabtooltip`, and `printheader` options and a missing `check_secure()` call in `mapset()`. The disclosure said the issue had no CVE at first and linked the fix and advisory information.
Vim fixes modeline sandbox bypass in patch v9.2.0276
The Vim project fixed a high-severity modeline sandbox bypass in patch v9.2.0276. The flaw affected Vim versions earlier than 9.2.0276 and could allow arbitrary OS command execution when a user opened a crafted file.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
4 references tracked. Mallory keeps watching after this page renders.
CVE-2026-34982 - Vim modeline bypass via various options affects Vim < 9.2.0276
cvefeed.io
Open sourceVim Modeline Bypass Vulnerability Let Attackers Execute Arbitrary OS Commands
cybersecuritynews.com
Open sourceoss-sec: Re: [vim-security] Vim modeline bypass via various options affects Vim < 9.2.0276
seclists.org
Open sourceoss-sec: [vim-security] Vim modeline bypass via various options affects Vim < 9.2.0276
seclists.org
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.

