OS Command Injection in Vim - #VU166524

 

OS Command Injection in Vim - #VU166524

Published: November 18, 2026


Vulnerability identifier: #VU166524
CSH Severity: Medium
CVSS v4: 8.4 [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]
CVE-ID: N/A
CWE-ID: CWE-78
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary commands with the privileges of the user running Vim.

The vulnerability exists due to incomplete escaping of typographic single quotes in runtime/ftplugin/ps1.vim when passing keyword lookup arguments to PowerShell with filetype plugins enabled and PowerShell installed. A remote attacker can supply a PowerShell script containing x’;./hook.ps1;’ and trick the victim into opening it, selecting the crafted line in Visual mode, and pressing K to execute arbitrary commands.


Affected software

Vim

Remediation

Install security update from vendor's website.

Vim - update to 9.2.1346

External References

Related Security Bulletins