CVE-2026-47162
CVE-2026-47162 — Vim: Vimscript Code Injection in netrw NetrwBookHistSave() via crafted directory name
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.
Published Updated Sources: cvelistV5, GitHub_M
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
7.3
HIGH
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Total
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Products (12)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 7.3 | CVSS 3.1 | HIGH | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-74
- CWE-94
- CWE-140
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1562.003Impair Defenses: Impair Command History Logging
- T1574.006Hijack Execution Flow: Dynamic Linker Hijacking
- T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /pack/dist/opt/netrw/autoload/netrw.vim), /.vim/.netrwhist.
References
14 on the record
- github.com/vim/vim/security/advisories/GHSA-crm5-rh6j-2c7c
x_refsource_CONFIRM
- github.com/vim/vim/commit/f08ab2f4d7d2947c8dd6c179ae08ee6146a2694b
x_refsource_MISC
- github.com/vim/vim/releases/tag/v9.2.0495
x_refsource_MISC
- access.redhat.com/security/cve/CVE-2026-47162
vdb-entry, x_refsource_REDHAT
- bugzilla.redhat.com/show_bug.cgi?id=2487964
issue-tracking, x_refsource_REDHAT
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-47162.json
x_sadp-csaf-vex
- access.redhat.com/errata/RHSA-2026:68711
vendor-advisory, x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:54769
vendor-advisory, x_refsource_REDHAT
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2026-140094 Openshift-apiserver: openshift: unauthorized templateinstance spec.requester.groups privilege escalationCVSS 9.9
- CVE-2026-93834 Qemu-kvm: 9pfs: use-after-free race in tlcreate/twalk allows vm guest escapeCVSS 8.8
- CVE-2026-136125 Cluster-ingress-operator: operator clusterrole grants wildcard verbs on secrets, serviceaccounts, namespaces and rbac cluster-wideCVSS 8.7
- CVE-2026-133842 Flatpak: flatpak: flatpak-system-helper extra-data privilege escalation if canonicalizing permissions fails with emfileCVSS 8.2
- CVE-2026-129975 Gpgme: gpgme: double free in read_status() via crafted signatureCVSS 8.1
- CVE-2024-6387 Openssh: regresshion - race condition in ssh allows rce/dosCVSS 8.1
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.