Claude AI finds Vim, Emacs RCE bugs that trigger on file open
好的,我现在需要帮用户总结一篇文章,控制在100字以内。首先,我得仔细阅读文章内容,抓住主要信息。 文章讲的是Vim和GNU Emacs这两个文本编辑器被发现存在漏洞。这些漏洞是通过使用Claude助手简单的提示发现的,允许远程代码执行,只需打开文件即可。Claude还创建了多个概念验证(PoC)漏洞,并帮助修复问题。 Vim的漏洞是因为处理modeline时缺少安全检查,导致嵌入代码在打开文件时执行。虽然有沙盒限制,但另一个问题让攻击代码绕过限制。Vim已经发布了补丁版本9.2.0272修复这个问题。 而GNU Emacs的问题则被认为是由Git引起的。攻击者可以构造一个包含恶意.git/config文件的存档,当用户提取并打开文件时,就会执行恶意代码。Emacs团队认为这是Git的问题,所以目前还没有修复。 用户可能需要一个简洁的总结,重点在于两个编辑器的漏洞、影响以及修复情况。我需要用简短的语言涵盖这些点。 最后,确保总结不超过100字,并且直接描述内容,不需要开头语。 </think> Vim和GNU Emacs文本编辑器被发现存在远程代码执行漏洞,通过简单提示使用Claude助手发现。Vim已修复漏洞并发布补丁版本9.2.0272;GNU Emacs问题尚未解决,建议用户谨慎处理未知来源文件。 2026-3-31 21:45:17 Author: www.bleepingcomputer.com(查看原文) 阅读量:4 收藏

Claude AI finds Vim, Emacs RCE bugs that trigger on file open

Vulnerabilities in the Vim and GNU Emacs text editors, discovered using simple prompts with the Claude assistant, allow remote code execution simply by opening a file.

The assistant also created multiple versions of proof-of-concept (PoC) exploits, refined them, and provided suggestions to address the security issues.

Vim and GNU Emacs are programmable text editors primarily used by developers and sysadmins for code editing, terminal-based workflows, and scripting. Vim in particular is widely used in DevOps, and is installed by default on most Linux server distributions, embedded systems, and macOS.

Vim flaw and fix

Hung Nguyen, a researcher at the boutique cybersecurity firm Calif, which specializes in AI red teaming and security engineering, found the issues in Vim after instructing Claude to find a remote code execution (RCE) zero-day vulnerability in the text editor triggered by opening a file.

The Claude assistant analyzed Vim’s source code and identified missing security checks and issues in modeline handling, allowing code embedded in a file to be executed upon opening.

A modeline is text placed at the beginning of a file that instructs Vim how to handle it.

Even if the code was supposed to run in a sandbox, another problem allowed it to bypass the restriction and execute commands in the context of the current user.

The vulnerability has not received a CVE ID and affects all versions of Vim 9.2.0271 and earlier.

Nguyen reported the issue to the Vim maintainers, who promptly released a patch in Vim version 9.2.0272. The Vim team noted that a victim would only need to open a specially crafted file to trigger the vulnerability.

“An attacker who can deliver a crafted file to a victim achieves arbitrary command execution with the privileges of the user running Vim,” reads the bulletin.

GNU Emacs points to Git

In the case of GNU Emacs, the vulnerability remains present, as the developer considers it Git’s responsibility to address.

The problem stems from GNU Emacs’ version control integration (vc-git), where opening a file triggers Git operations via vc-refresh-state, which causes Git to read the .git/config file and run a user-defined core.fsmonitor program, which can be abused to run arbitrary commands.

An attack scenario devised by the researcher involves creating an archive (e.g., an email or a shared drive) that contains a hidden .git/ directory with a config file pointing to an executable script.

When the victim extracts the archive and opens the text file, the payload executes without any visible indicators on the GNU Emacs default configuration.

GNU Emacs maintainers consider this a problem in Git, not the text editor, because the environment is merely the trigger for the dangerous action executed by Git: reading the attacker-controlled config and executing a program from it.

While this argument is technically correct, since nothing is executed in GNU Emacs directly, the risk to the user exists since the editor is automatically running Git on untrusted directories without neutralizing dangerous options and without requiring user consent, or sanbox protections.

Nguyen suggested that GNU Emacs could modify Git calls to explicitly block ‘core.fsmonitor,’ so any dangerous scripts/payloads wouldn’t be executed automatically  when opening a file.

As the flaw remains unpatched in the latest version of GNU Emacs, users are advised to exercise caution when opening files from unknown sources or downloaded online.

tines

Automated Pentesting Covers Only 1 of 6 Surfaces.

Automated pentesting proves the path exists. BAS proves whether your controls stop it. Most teams run one without the other.

This whitepaper maps six validation surfaces, shows where coverage ends, and provides practitioners with three diagnostic questions for any tool evaluation.


文章来源: https://www.bleepingcomputer.com/news/security/claude-ai-finds-vim-emacs-rce-bugs-that-trigger-on-file-open/
如有侵权请联系:admin#unsafe.sh