macvim-dev / macvim-dev/macvim

[Security] MacVim affected by CVE-2026-41411 — tag file command injection (vim < 9.2.0357)

Open
#1,646 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
7.9k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

[Security] MacVim affected by CVE-2026-41411 — tag file command injection (vim < 9.2.0357)

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.0357 that fixes CVE-2026-41411.

Vulnerability Details

  • Upstream CVE: CVE-2026-41411
  • Inherited from: vim/vim
  • Affected code: tag file processing (wildcard expansion of filename fields)
  • Vulnerability type: CWE-78 — OS Command Injection
  • Fixed in: vim 9.2.0357 (commit c78194e41d5a0b05b0ddf383b6679b1503f977fb)

Root Cause

Prior to vim 9.2.0357, when resolving a tag, the filename field from the tags file is passed
through wildcard expansion to resolve environment variables and wildcards. If a crafted tags
file contains a filename with shell metacharacters or backtick-enclosed commands, those
commands are executed when the tag is resolved.

An attacker who can influence the tags file (e.g., via a malicious project or downloaded
code repository) can achieve arbitrary command execution when the victim opens a file and
navigates to a tag definition.

Affected MacVim Version

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

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

git log --all --oneline | grep c78194e  # returns no output

Suggested Fix

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

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the bundled Vim source and its history, then compare the repository with upstream commit c78194e41d5a0b05b0ddf383b6679b1503f977fb; the issue notes that git log currently finds no matching commit. Update the bundled Vim patches to at least 9.2.0357 and verify that the MacVim build incorporates the upstream tag-file security fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, vim
Domain
desktop, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.