CVE-2026-47167 Vim: Vimscript Code Injection in cucumber filetype plugin via crafted step-definition regex

Medium 5.1 Published Updated

Attackers can execute arbitrary code via crafted Ruby patterns in cucumber files when users trigger step-jump mappings in Vim with Ruby support.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-47167?

CVE-2026-47167 is a medium-severity code injection vulnerability in Vim Vim, published on 11 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-95, CWE-94

Which versions are affected by CVE-2026-47167?

It affects 1 product.

Products include Vim Vim.

How do I fix CVE-2026-47167?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-47167 being exploited?

There is no known exploitation of CVE-2026-47167 in the wild and no public exploit code.

All Vim Vim vulnerabilities

Sources

Also known as AZL-89775, CLSA-2026-1782222901, CLSA-2026-1782984730, DEBIAN-CVE-2026-47167, ECHO-a9bb-dc9e-fa5f, GHSA-4473-94jm-w5x9 and 1 more.

Is CVE-2026-47167 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free