CVE-2026-51400

vim: Vim: Arbitrary code execution via vms_fixfilename() function

Published Aug 4, 2026 CVSS 3.1 · 8.4 High EPSS < 1% KEV · Not listed
Description
An issue in Vim Project v9.2.0389 and earlier allows a local attacker to execute arbitrary code via the vms_fixfilename() function within file vim/src/os_vms.c

Analysis

AI-generated

Technical impact

Vim communicates with users on a VMS platform through its os_vms.c code, and within that source a function called vms_fixfilename() performs memory operations on file names. The vulnerability, associated with both CWE-401 (Memory Corruption) and CWE-94 (Improper Control of Generation of Code), is triggered when the function processes a specially crafted filename. The resulting memory corruption permits a local attacker to cause the Vim process to execute arbitrary instructions, effectively taking control of the editor with the current user’s privileges. Although the flaw originates from a local code path, the consequences are severe because a compromised editor can lead to system compromise or further lateral movement if the user has elevated rights.

Affected Systems

The flaw is present in Vim Project versions up to and including 9.2.0389 that are built with VMS support enabled. Users running those builds on a VMS operating system—such as OpenVMS—are affected. The original description does not mention other vendors or platforms, and no other operating systems or vendor builds are known to contain the affected code path.

Risk and Exploitability

The attack vector is local; only a user who can launch Vim on the target VMS system can exploit this weakness. The flaw involves both memory corruption (CWE-401) and potentially code injection (CWE-94). The EPSS score is reported to be less than 1%, indicating a low current probability of exploitation. The CVSS score of 8.4 grades the vulnerability as high severity, reflecting the potential for arbitrary code execution with the attacker’s privileges. The vulnerability is not listed in the CISA KEV catalog, further underscoring its relatively low exploitation likelihood at present.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Vim to a release later than 9.2.0389, such as 9.2.0390 or newer, which removes the unsafe filename handling logic.
  • If an immediate upgrade is not feasible, rebuild Vim with VMS support disabled by using the '--without-vms' configure option, eliminating the vulnerable code path entirely.
  • Restrict local execution of Vim to trusted users only, applying file permission controls or mandatory access control mechanisms (e.g., SELinux or AppArmor) to limit which accounts can launch the editor.

Generated by OpenCVE AI on August 8, 2026 at 01:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Vim
Vim vim
CPEs cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
Vendors & Products Vim
Vim vim
Type Values Removed Values Added
Title Local Code Execution via vms_fixfilename() in Vim vim: Vim: Arbitrary code execution via vms_fixfilename() function
Weaknesses CWE-94
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
Title Local Code Execution via vms_fixfilename() in Vim
Type Values Removed Values Added
Title Local Code Execution via Filename Fixing in Vim v9.2.0389 and Earlier
Weaknesses CWE-20
Type Values Removed Values Added
Weaknesses CWE-401
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Local Code Execution via Filename Fixing in Vim v9.2.0389 and Earlier
Weaknesses CWE-20
Type Values Removed Values Added
Description An issue in Vim Project v9.2.0389 and earlier allows a local attacker to execute arbitrary code via the vms_fixfilename() function within file vim/src/os_vms.c
References
Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 5, 2026, 5:42 PM
Reserved
Jun 7, 2026, 12:00 AM
Status
Analyzed
Published
Aug 4, 2026, 9:16 PM
Modified
Oct 24, 2026, 4:10 PM
Severity
Moderate
Public date
Aug 4, 2026, 12:00 AM