macvim-dev / macvim-dev/macvim

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

Offen
#1,647 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Vim Script
Sterne
7.9k
Forks
691
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

[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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Vergleiche zunächst die mitgelieferte runtime/autoload/netrw.vim und die Vim-Patches in MacVim mit dem Upstream-Commit 405e2fb6d54d5653523809e2853d99d1c000a5fc. Bestätige, dass die mitgelieferte Vim-Version mindestens 9.2.0383 erreicht, und baue anschließend MacVim, um zu überprüfen, dass der Upstream-Sicherheitsfix vorhanden ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
vim
Bereich
security
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.