<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Modeline — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/modeline/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 06 Apr 2026 16:16:38 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/modeline/feed.xml" rel="self" type="application/rss+xml"/><item><title>Vim Modeline Sandbox Bypass Vulnerability (CVE-2026-34982)</title><link>https://feed.craftedsignal.io/briefs/2026-04-vim-modeline-bypass/</link><pubDate>Mon, 06 Apr 2026 16:16:38 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-vim-modeline-bypass/</guid><description>A critical vulnerability in Vim versions prior to 9.2.0276 allows arbitrary OS command execution via a crafted file that bypasses the modeline sandbox due to missing security checks, potentially leading to code execution.</description><content:encoded><![CDATA[<p>Vim, a widely used open-source command-line text editor, is susceptible to a critical vulnerability (CVE-2026-34982) affecting versions prior to 9.2.0276. This flaw allows a malicious actor to execute arbitrary operating system commands by crafting a specific file that exploits a bypass in the modeline sandbox. The vulnerability arises from the <code>complete</code>, <code>guitabtooltip</code>, and <code>printheader</code> options lacking the <code>P_MLE</code> flag, and the <code>mapset()</code> function not having a <code>check_secure()</code> call, which permits exploitation from sandboxed expressions. Successful exploitation requires a user to open a specially crafted file. This poses a significant risk, as attackers could leverage this vulnerability to gain unauthorized access to systems, escalate privileges, or perform other malicious activities. The vulnerability was patched in commit 9.2.0276.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious file containing a modeline with embedded OS commands.</li>
<li>The crafted file is distributed to the target via social engineering or other means.</li>
<li>Victim opens the malicious file using a vulnerable version of Vim (prior to 9.2.0276).</li>
<li>Vim parses the modeline in the file.</li>
<li>Due to the missing <code>P_MLE</code> flag in <code>complete</code>, <code>guitabtooltip</code>, or <code>printheader</code> options, the modeline is executed without proper sandboxing.</li>
<li>Alternatively, the <code>mapset()</code> function, lacking a <code>check_secure()</code> call, is abused from the sandboxed expression in the modeline.</li>
<li>Arbitrary OS commands embedded in the modeline are executed with the privileges of the user running Vim.</li>
<li>Attacker achieves code execution, potentially leading to system compromise, data exfiltration, or further malicious activities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-34982 can lead to arbitrary code execution on the affected system. The severity is compounded by the widespread use of Vim in various environments, including development, system administration, and general text editing. The impact could range from data breaches and malware installation to complete system compromise, depending on the commands executed and the privileges of the user opening the malicious file. While the exact number of potential victims is unknown, the ubiquity of Vim makes this vulnerability a significant concern for any organization using unpatched versions.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Vim to version 9.2.0276 or later to patch CVE-2026-34982.</li>
<li>Implement the provided Sigma rule to detect the execution of potentially malicious Vim commands based on process execution patterns.</li>
<li>Monitor network traffic for suspicious outbound connections originating from Vim processes after the execution of potentially malicious files, using network connection logs.</li>
<li>Use endpoint detection and response (EDR) solutions to identify and block suspicious processes spawned by Vim, leveraging process creation logs.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>vim</category><category>modeline</category><category>sandbox-bypass</category><category>code-execution</category><category>cve-2026-34982</category></item><item><title>Vim and Emacs Remote Code Execution Vulnerabilities Triggered by File Opening</title><link>https://feed.craftedsignal.io/briefs/2026-03-vim-emacs-rce/</link><pubDate>Tue, 31 Mar 2026 21:45:14 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-03-vim-emacs-rce/</guid><description>Vulnerabilities in Vim (&lt;=9.2.0271) and GNU Emacs allow remote code execution by opening a specially crafted file, leveraging flaws in modeline handling and Git integration, respectively.</description><content:encoded><![CDATA[<p>A researcher at Calif discovered vulnerabilities in Vim and GNU Emacs using the Claude AI assistant. The Vim vulnerability (versions 9.2.0271 and earlier) results from missing security checks in modeline handling, allowing arbitrary code execution when a specially crafted file is opened. A patch is available in version 9.2.0272. The GNU Emacs vulnerability stems from its integration with Git&rsquo;s version control (vc-git) and remains unpatched. Opening a file can trigger Git operations via <code>vc-refresh-state</code>, leading to the execution of arbitrary commands defined in a user-controlled <code>core.fsmonitor</code> program within a hidden <code>.git/config</code> file. This affects users who open files from untrusted sources.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker creates a malicious archive containing a text file and a hidden <code>.git/</code> directory.</li>
<li>The <code>.git/</code> directory includes a <code>config</code> file.</li>
<li>The <code>config</code> file contains a <code>core.fsmonitor</code> entry pointing to a malicious executable.</li>
<li>The attacker distributes the archive (e.g., via email or shared drive).</li>
<li>Victim extracts the archive on their system.</li>
<li>The victim opens the seemingly benign text file within GNU Emacs.</li>
<li>GNU Emacs&rsquo; <code>vc-git</code> integration triggers <code>vc-refresh-state</code>.</li>
<li><code>vc-refresh-state</code> causes Git to read the attacker-controlled <code>.git/config</code> file and execute the malicious <code>core.fsmonitor</code> program, achieving arbitrary code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of these vulnerabilities leads to arbitrary code execution with the privileges of the user running Vim or Emacs. For Vim, all versions 9.2.0271 and earlier are affected until patched. While the Emacs vulnerability remains unpatched, it poses a significant risk to users who routinely open files from unknown or untrusted sources, potentially leading to system compromise and data breaches. The number of potential victims is substantial given the widespread use of these editors by developers and system administrators.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Vim to version 9.2.0272 or later to patch the RCE vulnerability related to modeline handling (refer to the Vim flaw and fix section).</li>
<li>Exercise extreme caution when opening files from unknown sources or downloaded online when using GNU Emacs due to the unpatched Git integration vulnerability (refer to the GNU Emacs points to Git section).</li>
<li>Deploy the Sigma rule to detect execution of git with unusual core.fsmonitor configuration to your SIEM and tune for your environment.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>rce</category><category>vim</category><category>emacs</category><category>git</category><category>modeline</category></item></channel></rss>