CVE-2026-73077

Vim: Arbitrary Code Execution via Shell Keyword Lookup

Published Aug 11, 2026 CVSS 4.0 · 8.4 High EPSS < 1% KEV · Not listed
Description
Vim is an open source, command line text editor. Prior to 9.2.0839, the runtime/ftplugin/sh.vim, runtime/ftplugin/zsh.vim, and runtime/ftplugin/ps1.vim filetype plugins pass attacker-controlled Visual-mode selections from K through keywordprg commands without safely separating shell arguments. fnameescape() and PATH_ESC_CHARS do not neutralize shell metacharacters before ShKeywordPrg, ZshKeywordPrg, or GetHelp invokes bash, zsh, or PowerShell, allowing arbitrary operating-system commands to execute with the privileges of the user running Vim. This issue is fixed in version 9.2.0839.

Analysis

AI-generated

Technical impact

Vim, a widely‑used command‑line editor, contains a flaw in shell‑keyword lookup plugins that passes user‑controlled visual selections directly into shell commands without proper escaping. The vulnerability is a classic command‑injection fault (CWE‑78) and can result in arbitrary operating‑system commands executing with the privileges of the Vim process. An attacker who can inject a selection in a shell, zsh, or PowerShell filetype context can freely read or tamper with files, elevate local privileges, or establish persistence on the host.

Affected Systems

The flaw affects Vim versions earlier than 9.2.0839 distributed by the vim:vim vendor. Any installation running the ftplugin scripts for sh, zsh or ps1 filetypes is vulnerable. The issue is mitigated only by upgrading to Vim 9.2.0839 or later.

Risk and Exploitability

The CVSS score of 8.4 indicates a high severity, but the EPSS score of less than 1 % suggests a very low current exploitation probability. It is not listed in the CISA KEV catalog, implying no widespread known exploitation yet. The attack vector requires the attacker to be able to supply a visual selection or modify a buffer, so it is limited to local users or compromised sessions with editor access. Nonetheless, the impact remains severe if the attacker succeeds.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Vim 9.2.0839 or a newer release that includes the fixed ftplugin logic.
  • If an immediate upgrade is not possible, remove or comment out the sh.zsh.ps1 ftplugin files from Vim’s runtime directory to prevent the vulnerable keyword lookups.
  • Ensure that the environment’s PATH and shell metacharacters are sanitized when invoking external editors, and restrict editors to run with least privileges for users that do not require shell keyword lookup.

Generated by OpenCVE AI on August 12, 2026 at 20:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Vim is an open source, command line text editor. Prior to 9.2.0839, the runtime/ftplugin/sh.vim, runtime/ftplugin/zsh.vim, and runtime/ftplugin/ps1.vim filetype plugins pass attacker-controlled Visual-mode selections from K through keywordprg commands without safely separating shell arguments. fnameescape() and PATH_ESC_CHARS do not neutralize shell metacharacters before ShKeywordPrg, ZshKeywordPrg, or GetHelp invokes bash, zsh, or PowerShell, allowing arbitrary operating-system commands to execute with the privileges of the user running Vim. This issue is fixed in version 9.2.0839.
Title Vim: Arbitrary Code Execution via Shell Keyword Lookup
Weaknesses CWE-78
References
Metrics cvssV4_0

{'score': 8.4, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 11, 2026, 6:33 PM
Reserved
Aug 10, 2026, 7:37 PM
Status
Analyzed
Published
Aug 11, 2026, 4:17 PM
Modified
Oct 6, 2026, 7:34 PM
Severity
Important
Public date
Aug 11, 2026, 3:39 PM