File-Open RCE Bugs Found in Vim and GNU Emacs

Summary
Opening a crafted file can trigger code execution through Vim’s modeline handling or GNU Emacs’ vc-git integration. Vim fixed its flaw in 9.2.0272; the Emacs issue remains unpatched.
Key points
- A researcher used Claude to identify and develop proof-of-concept exploits for file-open-triggered code execution in Vim and GNU Emacs.
- Vim’s modeline handling and missing checks allowed commands to escape the sandbox and run with the user’s privileges.
- Vim versions 9.2.0271 and earlier are affected; maintainers patched the flaw in version 9.2.0272.
- In GNU Emacs, vc-git can trigger Git operations that read an attacker-controlled .git/config and execute its configured core.fsmonitor program.
- The Emacs issue remains unpatched; maintainers consider the underlying problem Git’s responsibility.
- The researcher suggested blocking core.fsmonitor in Emacs’ Git calls. Users are advised to avoid opening files from untrusted sources.
Article Details
- Vulnerability Types
- Remote code execution
- Sandbox escape
- Affected Versions
- Vim 9.2.0271 and earlier
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- partial
- Workarounds
- Avoid opening files from untrusted or unknown sources.
MITRE ATT&CK
T1059 · Command and Scripting InterpreterThe Vim flaw allows commands embedded in a file to execute, and the GNU Emacs/Git issue can execute a program specified through core.fsmonitor.T1204.002 · Malicious FileOpening a specially crafted file can trigger command execution in Vim; opening a file from an extracted archive can trigger the GNU Emacs/Git issue.
People
Products
GitVim was patched in version 9.2.0272 while the Emacs issue remains unpatched due to maintainers attributing the root cause to Git’s behavior; users should avoid opening files from untrusted sources.GNU EmacsVulnerabilities in the Vim and GNU Emacs text editors can allow remote code execution simply by opening a specially crafted file, and a researcher used the Claude assistant to generate multiple proof-of-concept exploitsVimVulnerabilities in the Vim and GNU Emacs text editors can allow remote code execution simply by opening a specially crafted file, and a researcher used the Claude assistant to generate multiple proof-of-concept exploits
