Skip to main content
← All vulnerabilities
CVE-2026-43961GHSA-66HR-7P6X-X5J3

Vim: vimscript injection via unescaped filename in netrw s:netrwmarkfile() filter() expression allows arbitrary code execution

Affects Vim before 9.2.0480 when the netrw plugin is used, and Red Hat products that ship Vim. Fixed in Vim 9.2.0480 and Red Hat's vim-9.2.967-1.1.hum1 package.

Published
Last modified
published
Not listed in CISA KEV
Specific setups only
Fix
Fixed in 9.2.0480
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

A flaw was found in Vim's netrw plugin. A crafted filename containing quote characters and expression fragments can break out of the quoted context during mark/unmark operations, allowing arbitrary Vimscript execution. This can be leveraged to run shell commands with the privileges of the user running Vim.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • vim vim

    fixed in 9.2.0480

  • vim-main

    Version range not reported

  • vim

    Version range not reported

  • vim

    Version range not reported

  • vim

    Version range not reported

  • vim

    Version range not reported

  • vim

    Version range not reported

  • openshift/ose-rhel-coreos-8

    Version range not reported

  • openshift/ose-rhel-coreos-9

    Version range not reported

  • openshift/ose-rhel-coreos-9

    Version range not reported

References 4

access.redhat.com

bugzilla.redhat.com

GitHub · vim/vim

FAQ

Questions about CVE-2026-43961

What does this mean?

A crafted filename in a directory can inject Vimscript through Vim's netrw plugin when the directory is browsed. The injected Vimscript can run shell commands with the privileges of the user running Vim.Source: access.redhat.com, access.redhat.com

Am I affected, and how do I check?

Vim versions before 9.2.0480 are affected, and the listed Red Hat products ship Vim. To check a Vim install, run vim --version or :version inside Vim and compare the patch number with 9.2.0480. The issue involves browsing directories with netrw.Source: access.redhat.com, access.redhat.com

What should I do about it?

Upgrade Vim to 9.2.0480 or later. For the listed Red Hat products, the fixed package is vim-9.2.967-1.1.hum1.Source: access.redhat.com, access.redhat.com

Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data