CVE Database›Document archive›CVE-2026-47167

CVE-2026-47167

vim: Vim: Arbitrary code execution via crafted step-definition patterns

Loading…

Severity

Important

Red Hat Product Security

7.3

CVSS 3.1

Review impact separately from score.

Published · June 12, 2026

Updated · October 30, 2026

Description

A flaw was found in Vim, a command-line text editor. This vulnerability, identified as a code injection, affects the cucumber filetype plugin when Vim is configured with Ruby support. An attacker could exploit this by creating a malicious repository containing specially crafted step-definition patterns. If a user opens this repository and triggers a specific function, the crafted patterns are unsafely processed, potentially allowing the attacker to execute unauthorized commands on the user's system.

Statement

This Important vulnerability in Vim's cucumber filetype plugin, when configured with Ruby support, allows for arbitrary code execution. An attacker could exploit this by convincing a user to open a specially crafted repository and trigger a specific step-jump mapping, leading to local command execution. This risk is contingent on user interaction with untrusted content and the presence of the Ruby-enabled cucumber plugin.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this issue, users should exercise caution when opening untrusted files or repositories with Vim, particularly those that might trigger the cucumber filetype plugin. Avoiding interaction with untrusted content can prevent the execution of malicious step-definition patterns.

CVSS / CWE

CVSS 3.1 · 7.3
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

CWE-94 · Improper Control of Generation of Code ('Code Injection')