CVE-2026-51401

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

Published Aug 4, 2026 CVSS 3.1 · 7.7 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

The flaw exists within the Vim text editor’s vms_fixfilename() routine in os_vms.c. It allows a local attacker who can run Vim to execute arbitrary code, effectively compromising the execution environment of the vulnerable instance. The vulnerability is a classic code injection scenario that can grant an attacker full control over the system process running Vim.

Affected Systems

All Vim Project releases up to and including version 9.2.0389 are affected. Versions newer than 9.2.0389 have been updated to fix the issue. The vulnerability applies to any system running Vim where os_vms.c is compiled and used.

Risk and Exploitability

EPSS indicates a probability of exploitation that is less than 1%, reflecting a very low likelihood of being exploited in the wild. The CVSS score of 7.7 classifies this vulnerability as High, indicating significant potential for arbitrary code execution. The vulnerability is not listed in CISA KEV, with no documented public exploit. It is inferred that the attack vector is local, requiring user access that can launch Vim and trigger the vulnerable function. Given the impact, the severity is High.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Vim to a version later than 9.2.0389, such as the current latest release.
  • If upgrading is not immediately possible, apply a source‑level patch to os_vms.c to neutralize or restrict the vms_fixfilename() functionality.
  • Limit the execution permissions of Vim and its configuration files and run Vim under the least‑privileged user accounts to reduce the potential damage from an exploit.

Generated by OpenCVE AI on August 5, 2026 at 23:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-77
Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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

cvssV3_1

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

Type Values Removed Values Added
Title Local Arbitrary Code Execution via vms_fixfilename in Vim vim: Vim: Arbitrary code execution via vms_fixfilename() function
Weaknesses CWE-641
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim
Type Values Removed Values Added
Title Local Arbitrary Code Execution via vms_fixfilename in Vim
Weaknesses CWE-77
CWE-94
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-641

    Improper Restriction of Names for Files and Other Resources

  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 5, 2026, 7:14 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
Important
Public date
Aug 4, 2026, 12:00 AM