File-Open RCE Bugs Found in Vim and GNU Emacs

· Original article ↗

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

People

Products

Tools

Related Articles