Vim Cucumber Plugin Code Injection Lets Malicious Repos Execute Ruby
Vim disclosed a medium-severity code injection flaw in its Cucumber filetype plugin that affects versions earlier than 9.2.0496 when compiled with +ruby support. The bug is in s:stepmatch() in runtime/ftplugin/cucumber.vim, where attacker-controlled step-definition regex patterns from repository .rb files were inserted into Ruby Kernel.eval() without sufficient escaping, allowing arbitrary Ruby execution and potentially shell command execution. The issue is tracked in GitHub Security Advisory GHSA-4473-94jm-w5x9 and mapped to CWE-94 and CWE-95.
Exploitation requires a user to open a malicious cucumber-style repository and trigger the step-jump mappings [d] or ]d on a matching feature line; the vulnerability does not fire through omni-completion alone because CucumberComplete() does not call the vulnerable path. Vim fixed the bug in patch 9.2.0496 by replacing Kernel.eval() with Regexp.new(), keeping the regex as untrusted data rather than executable code, and added a regression test using a proof-of-concept payload that attempted to invoke system("touch ..."). The project credited Aisle Research for reporting and analyzing the flaw.
Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
4 events from the most recent confirmed update back to the earliest known activity.
oss-sec notice publishes details of the Vim code injection issue
An oss-sec mailing list post announced the Vimscript code injection vulnerability in the cucumber filetype plugin, including affected versions, exploitation requirements, and the availability of patch 9.2.0496. The notice also credited Aisle Research for reporting and analysis.
GitHub advisory GHSA-4473-94jm-w5x9 discloses the Vim flaw
A GitHub Security Advisory publicly disclosed the medium-severity vulnerability affecting Vim versions earlier than 9.2.0496 and described the exploitation conditions, affected component, and impact. The advisory noted that a CVE had been requested but was not yet assigned.
Vim releases patch 9.2.0496 to fix the vulnerability
Vim fixed the cucumber plugin vulnerability in patch v9.2.0496 by replacing the unsafe Kernel.eval() usage with Regexp.new(), preventing untrusted regex data from being executed as code. The patch also added a regression test with a proof-of-concept payload to verify the exploit no longer works.
Aisle Research reports Vim cucumber plugin code injection flaw
Aisle Research identified and reported a code injection vulnerability in Vim's cucumber filetype plugin, where attacker-controlled step-definition regex patterns could reach Ruby's Kernel.eval() in s:stepmatch(). The issue affected Vim builds with +ruby support and could lead to arbitrary Ruby and shell command execution when users invoked step-jump mappings in a malicious repository.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
3 references tracked. Mallory keeps watching after this page renders.
Vimscript Code Injection in cucumber filetype plugin via crafted step-definition regex affects Vim < 9.2.0496 · Advisory · vim/vim · GitHub
github.com
Open sourcepatch 9.2.0496: [security]: Code Injection in cucumber filetype plugin · vim/vim@a65a52d · GitHub
github.com
Open sourceoss-sec: [vim-security] Vimscript Code Injection in cucumber filetype plugin via crafted step-definition regex affects Vim < 9.2.0496
seclists.org
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


