{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-47162",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2026-05-18T21:25:34.496Z",
        "datePublished": "2026-06-11T18:32:14.471Z",
        "dateUpdated": "2026-09-04T12:04:51.025Z"
    },
    "containers": {
        "cna": {
            "title": "Vim: Vimscript Code Injection in netrw NetrwBookHistSave() via crafted directory name",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-74",
                            "lang": "en",
                            "description": "CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')",
                            "type": "CWE"
                        }
                    ]
                },
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-94",
                            "lang": "en",
                            "description": "CWE-94: Improper Control of Generation of Code ('Code Injection')",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV4_0": {
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "PRESENT",
                        "privilegesRequired": "LOW",
                        "userInteraction": "ACTIVE",
                        "vulnConfidentialityImpact": "HIGH",
                        "vulnIntegrityImpact": "HIGH",
                        "vulnAvailabilityImpact": "HIGH",
                        "subConfidentialityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "subAvailabilityImpact": "NONE",
                        "baseScore": 7.3,
                        "baseSeverity": "HIGH",
                        "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
                        "version": "4.0"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/vim/vim/security/advisories/GHSA-crm5-rh6j-2c7c",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/vim/vim/security/advisories/GHSA-crm5-rh6j-2c7c"
                },
                {
                    "name": "https://github.com/vim/vim/commit/f08ab2f4d7d2947c8dd6c179ae08ee6146a2694b",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/vim/vim/commit/f08ab2f4d7d2947c8dd6c179ae08ee6146a2694b"
                },
                {
                    "name": "https://github.com/vim/vim/releases/tag/v9.2.0495",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/vim/vim/releases/tag/v9.2.0495"
                }
            ],
            "affected": [
                {
                    "vendor": "vim",
                    "product": "vim",
                    "versions": [
                        {
                            "version": "< 9.2.0495",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2026-06-11T18:32:14.471Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "Vim is an open source, command line text editor. Prior to version 9.2.0495, a Vimscript code injection vulnerability exists in s:NetrwBookHistSave() in the netrw plugin (runtime/pack/dist/opt/netrw/autoload/netrw.vim) when serializing browsed directory paths to the history file ~/.vim/.netrwhist. A directory name derived from the filesystem is interpolated into a single-quoted Vimscript string literal without escaping embedded single quotes, allowing a crafted directory name to break out of the string context and execute arbitrary Vimscript, including shell commands via system() and :!, the next time the history file is sourced. This issue has been patched in version 9.2.0495."
                }
            ],
            "source": {
                "advisory": "GHSA-crm5-rh6j-2c7c",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-06-12T03:55:42.649076Z",
                                "id": "CVE-2026-47162",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-12T12:47:52.867Z"
                }
            },
            {
                "affected": [
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/o:redhat:enterprise_linux:10.2"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 10",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "2:9.1.083-9.el10_2.7",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/o:redhat:enterprise_linux_eus:10.0"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 10.0 Extended Update Support",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "2:9.1.083-5.el10_0.4",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/a:redhat:enterprise_linux:8",
                            "cpe:/o:redhat:enterprise_linux:8"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 8",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "2:8.0.1763-27.el8_10",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/a:redhat:enterprise_linux:9",
                            "cpe:/o:redhat:enterprise_linux:9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 9",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "2:8.2.2637-26.el9_8.10",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/a:redhat:openshift:4.22::el9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "rhcos",
                        "product": "Red Hat OpenShift Container Platform 4.22",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "4.22.9.8.202608130832-0",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://catalog.redhat.com/software/containers/",
                        "cpes": [
                            "cpe:/a:redhat:insights_proxy:1.5::el9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "insights-proxy/insights-proxy-container-rhel9",
                        "product": "Red Hat Insights proxy 1.5",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "1786433656",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://catalog.redhat.com/software/containers/",
                        "cpes": [
                            "cpe:/a:redhat:rhui:5::el9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "rhui5/cds-kubernetes-tp-rhel9",
                        "product": "Red Hat Update Infrastructure 5",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "1787241211",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://catalog.redhat.com/software/containers/",
                        "cpes": [
                            "cpe:/a:redhat:rhui:5::el9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "rhui5/installer-tp-rhel9",
                        "product": "Red Hat Update Infrastructure 5",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "1787135742",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://catalog.redhat.com/software/containers/",
                        "cpes": [
                            "cpe:/a:redhat:rhui:5::el9"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "rhui5/rhua-tp-rhel9",
                        "product": "Red Hat Update Infrastructure 5",
                        "vendor": "Red Hat",
                        "versions": [
                            {
                                "lessThan": "*",
                                "status": "unaffected",
                                "version": "1787241260",
                                "versionType": "rpm"
                            }
                        ]
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/o:redhat:enterprise_linux:6"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 6",
                        "vendor": "Red Hat"
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/o:redhat:enterprise_linux:7"
                        ],
                        "defaultStatus": "affected",
                        "packageName": "vim",
                        "product": "Red Hat Enterprise Linux 7",
                        "vendor": "Red Hat"
                    },
                    {
                        "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
                        "cpes": [
                            "cpe:/a:redhat:openshift:4"
                        ],
                        "defaultStatus": "unaffected",
                        "packageName": "openshift/ose-rhel-coreos-8",
                        "product": "Red Hat OpenShift Container Platform 4",
                        "vendor": "Red Hat"
                    }
                ],
                "datePublic": "2026-06-11T18:32:14.471Z",
                "descriptions": [
                    {
                        "lang": "en",
                        "value": "A flaw was found in Vim, an open-source text editor. This vulnerability, located in the netrw plugin, involves a code injection issue when the editor processes directory paths. A malicious directory name, if crafted by an attacker, could bypass security measures and allow for the execution of unauthorized commands. This could lead to arbitrary code execution on the affected system."
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "content": {
                                "namespace": "https://access.redhat.com/security/updates/classification/",
                                "value": "Important"
                            },
                            "type": "Red Hat severity rating"
                        }
                    },
                    {
                        "cvssV3_1": {
                            "attackComplexity": "LOW",
                            "attackVector": "LOCAL",
                            "availabilityImpact": "HIGH",
                            "baseScore": 7.3,
                            "baseSeverity": "HIGH",
                            "confidentialityImpact": "HIGH",
                            "integrityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "scope": "UNCHANGED",
                            "userInteraction": "REQUIRED",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
                            "version": "3.1"
                        },
                        "format": "CVSS"
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "cweId": "CWE-140",
                                "description": "Improper Neutralization of Delimiters",
                                "lang": "en",
                                "type": "CWE"
                            }
                        ]
                    }
                ],
                "references": [
                    {
                        "tags": [
                            "vdb-entry",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/security/cve/CVE-2026-47162"
                    },
                    {
                        "name": "RHBZ#2487964",
                        "tags": [
                            "issue-tracking",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2487964"
                    },
                    {
                        "tags": [
                            "x_sadp-csaf-vex"
                        ],
                        "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-47162.json"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:54769"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:55431"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:38509"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:38510"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:38511"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:53371"
                    },
                    {
                        "tags": [
                            "vendor-advisory",
                            "x_refsource_REDHAT"
                        ],
                        "url": "https://access.redhat.com/errata/RHSA-2026:58981"
                    }
                ],
                "solutions": [
                    {
                        "lang": "en",
                        "value": "RHSA-2026:54769: Red Hat OpenShift Container Platform 4.22"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:55431: Red Hat Enterprise Linux AppStream EUS (v. 10.0), Red Hat Enterprise Linux BaseOS EUS (v. 10.0)"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:38509: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10)"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:38510: Red Hat Enterprise Linux AppStream (v. 8), Red Hat Enterprise Linux BaseOS (v. 8)"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:38511: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux BaseOS (v. 9)"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:53371: Red Hat Insights proxy 1.5"
                    },
                    {
                        "lang": "en",
                        "value": "RHSA-2026:58981: Red Hat Update Infrastructure 5"
                    }
                ],
                "timeline": [
                    {
                        "lang": "en",
                        "time": "2026-06-11T19:00:56.050Z",
                        "value": "Reported to Red Hat."
                    },
                    {
                        "lang": "en",
                        "time": "2026-06-11T18:32:14.471Z",
                        "value": "Made public."
                    }
                ],
                "title": "vim: Vim: Arbitrary Code Execution via crafted directory names",
                "x_adpType": "supplier",
                "x_generator": {
                    "engine": "sadp-cli 1.0.0"
                },
                "providerMetadata": {
                    "orgId": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
                    "shortName": "redhat-SADP",
                    "dateUpdated": "2026-09-04T12:04:51.025Z"
                }
            }
        ]
    }
}