macvim-dev / macvim-dev/macvim
[Security] MacVim affected by CVE-2026-42307 — netrw OS command injection (vim < 9.2.0383)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Vim Script
- Star
- 7.9k
- Fork
- 691
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
[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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách so sánh runtime/autoload/netrw.vim được tích hợp và các bản vá Vim trong MacVim với commit upstream 405e2fb6d54d5653523809e2853d99d1c000a5fc. Xác nhận rằng phiên bản Vim được tích hợp đạt ít nhất 9.2.0383, sau đó build MacVim và xác minh rằng bản sửa lỗi bảo mật upstream đã có mặt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- vim
- Lĩnh vực
- security
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100