<?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>Emacs — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/emacs/</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>Tue, 31 Mar 2026 21:45:14 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/emacs/feed.xml" rel="self" type="application/rss+xml"/><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>