macvim-dev / macvim-dev/macvim

[Security] MacVim affected by CVE-2026-42307 — netrw OS command injection (vim < 9.2.0383)

未关闭
#1,647 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Vim Script
星标
7.9k
派生
691
PR 合并指标
30 天内没有已合并 PR

描述

[Security] MacVim affected by CVE-2026-42307 — netrw OS command injection (vim < 9.2.0383)

Summary

MacVim bundles the vim source at version 9.2 (patches 1-332 in the current build), which is
below the patched version 9.2.0383 that fixes CVE-2026-42307.

Vulnerability Details

  • Upstream CVE: CVE-2026-42307
  • Inherited from: vim/vim
  • Affected code: runtime/autoload/netrw.vim — netrw standard plugin
  • Vulnerability type: CWE-78 — OS Command Injection
  • Fixed in: vim 9.2.0383 (commit 405e2fb6d54d5653523809e2853d99d1c000a5fc)

Root Cause

Prior to vim 9.2.0383, an OS command injection vulnerability exists in the netrw standard
plugin bundled with vim. By inducing a user to open a crafted URL (e.g., using the sftp://
or file:// protocol handlers), an attacker can execute arbitrary shell commands. Netrw
constructs shell commands from user-controlled URL components without adequate sanitization.

An attacker who can trick a user into opening a specially crafted URL in vim (e.g., via a
malicious link in a file opened for editing) can achieve arbitrary command execution.

Affected MacVim Version

MacVim r183 (vim 9.2 patches 1-332) — current HEAD as of 2026-05-18.

The fix commit 405e2fb6d54d5653523809e2853d99d1c000a5fc from vim/vim is not present
in the macvim-dev/macvim repository:

git log --all --oneline | grep 405e2fb6  # returns no output

Suggested Fix

Merge or cherry-pick vim/vim patches up to at least 9.2.0383:

References

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,将捆绑的 runtime/autoload/netrw.vim 和 MacVim 中的 Vim 补丁与 upstream 提交 405e2fb6d54d5653523809e2853d99d1c000a5fc 进行比较。确认捆绑的 Vim 版本至少达到 9.2.0383,然后构建 MacVim 并验证 upstream 安全修复已存在。

由索引模型根据 Issue 内容生成。

评估

技术栈
vim
领域
security
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
描述清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。