<Vulnerability name="CVE-2026-51401">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-08-04T00:00:00</PublicDate>
    <Bugzilla id="2511255" url="https://bugzilla.redhat.com/show_bug.cgi?id=2511255" xml:lang="en:us">
vim: Vim: Arbitrary code execution via vms_fixfilename() function
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-641</CWE>
    <Details xml:lang="en:us" source="Mitre">
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
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Vim. A local attacker could exploit a vulnerability in the `vms_fixfilename()` function, allowing them to execute arbitrary code on the system. This could lead to a complete compromise of the affected system.
    </Details>
    <Statement xml:lang="en:us">
Red Hat Enterprise Linux and Fedora build Vim against the POSIX/Linux platform layer (os_unix.c). The vulnerable function, vms_fixfilename(), is defined in os_vms.c, which provides OpenVMS-specific support and is never compiled into Red Hat's or Fedora's Vim packages. As a result, none of Red Hat's shipped Vim builds contain the affected code path.
    </Statement>
    <Mitigation xml:lang="en:us">
No mitigation is required. Red Hat does not ship any product containing the vulnerable code path - the affected function is confined to Vim's OpenVMS platform support, which is not included in Red Hat Enterprise Linux or Fedora builds.
    </Mitigation>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:10">
        <ProductName>Red Hat Enterprise Linux 10</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>vim</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift:4">
        <ProductName>Red Hat OpenShift Container Platform 4</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhcos</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-51401
https://nvd.nist.gov/vuln/detail/CVE-2026-51401
https://gist.github.com/jiejiaodedengdai/ff5d34a523167e09b7d8330cc9f5d4e5#file-vim-os_vms-cves-md
https://github.com/vim/vim
https://github.com/vim/vim/blob/master/src/os_vms.c
    </References>
</Vulnerability>