CVE-2026-42307
Vim: Vim: Arbitrary code execution via OS command injection in netrw plugin
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · May 9, 2026
Updated · September 1, 2026
Description
A flaw was found in Vim’s netrw plugin. Improper sanitization of specially crafted filenames or URLs could allow shell metacharacters to be included in temporary filenames passed to external commands. A local attacker could exploit this issue to trigger unintended shell command execution when a user opens malicious content using affected netrw functionality.
Statement
This vulnerability affects Vim’s netrw plugin URL and file handling functionality. Red Hat Product Security has assessed this issue as a Moderate severity vulnerability.
A local attacker may craft malicious filenames or URLs containing shell metacharacters that trigger unintended shell command execution when opened by a victim using affected netrw functionality in Vim. Successful exploitation requires user interaction because the victim must open attacker-controlled content.
Red Hat therefore assessed the Confidentiality and Integrity impacts as Low (C:L/I:L), with no direct Availability impact (A:N).
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
Red Hat is not aware of a practical temporary workaround that fully mitigates this issue or meets Red Hat Product Security's standards for usability, deployment, applicability, or stability.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')