CVE-2026-51401 in Viminfo

Summary

by MITRE • 08/05/2026

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

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/05/2026

The vulnerability resides within the Vim text editor project version 9.2.0389 and earlier, specifically in the vms_fixfilename() function located in the file vim/src/os_vms.c. This represents a critical security flaw that enables local attackers to execute arbitrary code on systems running affected versions of Vim. The issue stems from improper handling of filename processing within the VMS (Virtual Memory System) operating environment, creating a potential code execution vector that could be exploited by malicious actors with local access to the system.

The technical flaw manifests through insufficient input validation and sanitization within the vms_fixfilename() function, which processes filenames in VMS environments. When Vim processes certain filename inputs, the function fails to properly validate or sanitize user-supplied data, leading to potential buffer overflows or injection vulnerabilities. This weakness allows an attacker to craft malicious filename inputs that can trigger unintended code execution when the vulnerable function processes these inputs during normal Vim operations. The vulnerability is particularly concerning because it operates at the system level within Vim's core functionality, making it difficult to detect and mitigate through standard security measures.

The operational impact of this vulnerability extends beyond simple privilege escalation, as local attackers with minimal system access can leverage this flaw to execute arbitrary commands with the privileges of the user running Vim. This creates a significant risk for environments where Vim is frequently used, particularly in development environments or systems where users may have elevated privileges through their Vim usage patterns. The attack surface is broad since Vim is widely installed across Unix-like systems and VMS environments, making this vulnerability potentially exploitable across numerous platforms and use cases.

Organizations should immediately update to Vim version 9.2.0390 or later, which contains the patched implementation of the vms_fixfilename() function. Additionally, system administrators should monitor for any unusual file processing activities or unexpected command executions that might indicate exploitation attempts. The vulnerability aligns with CWE-121, Heap-based Buffer Overflow, and potentially CWE-78, Improper Neutralization of Special Elements used in a Command, as it involves both memory corruption and command injection aspects. From an ATT&CK framework perspective, this vulnerability maps to T1059.006 for Command and Scripting Interpreter and T1203 for Exploitation for Client Execution, representing the attack paths that adversaries would use to leverage this flaw.

Security teams should implement network monitoring to detect any unusual file processing patterns or system calls that might indicate exploitation attempts, while also considering restricting local access to Vim installations where possible. Regular vulnerability assessments should include checking for outdated Vim versions across all systems, particularly those running VMS environments where this specific function is most relevant. The patched version addresses the core issue by implementing proper input validation and bounds checking within the vms_fixfilename() function, preventing malicious inputs from triggering unintended code execution sequences that could compromise system integrity and confidentiality.

Responsible

MITRE

Reservation

06/07/2026

Disclosure

08/05/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!