OS Command Injection in Vim - CVE-2026-42307

 

OS Command Injection in Vim - CVE-2026-42307

Published: April 23, 2026 / Updated: May 27, 2026


Vulnerability identifier: #VU126891
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-42307
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Vim.org
Affected software:
Vim

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary shell commands.

The vulnerability exists due to improper neutralization of special elements used in an OS command in the netrw standard plugin function s:GetTempfile() when processing crafted local or remote URLs. A remote attacker can trick the victim into opening a crafted URL to execute arbitrary shell commands.

User interaction is required to open a crafted URL, and the injected payload is typically visible in the filename.


How to mitigate CVE-2026-42307

Install security update from vendor's website.

Sources