Skip to main content

Vim CVE-2026-59858

HIGH
Code Injection (CWE-94)
2026-07-09 GitHub_M
8.4
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft tags file with Ex command in typeref field
  2. Delivery
    Distribute malicious C project to victim
  3. Exploit
    Victim opens .c file and runs C omni-completion
  4. Execution
    ccomplete.vim injects field into :execute'd :vimgrep
  5. Impact
    Arbitrary Ex command runs as editing user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the victim open a .c file from an attacker-controlled project whose accompanying ctags tags file contains a crafted entry with a malicious typeref: or typename: extension field, AND that the victim invoke Vim's C omni-completion (Ctrl-X Ctrl-O) on a symbol resolved through that entry; only Vim versions prior to 9.2.0735 are affected. Limiting factors are significant: the attack is local (AV:L) with no network reach, it needs active user interaction (UI:A) - the user must both open the hostile file and trigger completion - and it is confined to C omni-completion using a project tags file, so users who never run omni-completion or who use trusted, self-generated tags files are not exposed. No authentication is required (PR:N), and it works against default Vim configurations that have C omni-completion available.

Impact

The supplied CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H, score 8.4) is internally consistent with the description: exploitation is local (the victim must open a file), requires no privileges, but does require active user interaction (opening the hostile .c file and invoking C omni-completion). The high VC/VI/VA ratings are justified because the injected command runs as the user and can read, modify, or destroy anything that user can. Countervailing signals lower the practical urgency: no POC is identified, there is no CISA KEV listing, and EPSS data was not provided, so no exploitation-probability signal is available. The realistic risk is meaningful but constrained - it depends on a social-engineering step (getting a developer to open a malicious C project with a poisoned tags file and run completion), which is why the vector uses UI:A rather than being a remote drive-by. This is a credible developer-workstation supply-chain-style threat rather than a mass-exploitable network vulnerability. No key signals conflict, but the absence of EPSS and POC data means widespread automated exploitation cannot be assessed from the available inputs.

Exploit ScenarioDerived

An attacker publishes a seemingly legitimate C project (for example on a public repository) that includes a tags file whose typeref: or typename: field contains a bar followed by an Ex command such as one that spawns a shell. A developer clones the project, opens one of its .c files in a vulnerable Vim, and presses Ctrl-X Ctrl-O to complete a symbol, at which point the injected Ex command executes with the developer's privileges. No public POC is currently identified, and the local attack vector plus required user interaction mean the attacker must lure the victim into opening the project and using completion.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 09, 2026

Arbitrary Ex command execution in Vim before 9.2.0735 arises from its C omni-completion script (runtime/autoload/ccomplete.vim), which interpolates the unescaped typeref: or typename: field of a tags entry into a :vimgrep pattern passed to :execute. Because :vimgrep treats the bar character as a command separator, a crafted tag field can terminate the search pattern and append an attacker-controlled command that runs with the privileges of the editing user when a victim opens a malicious .c file and triggers C omni-completion. There is no public exploit identified at time of analysis and it is not listed in CISA KEV, but the CVSS 4.0 base score of 8.4 reflects high confidentiality, integrity, and availability impact.

RemediationAI

Vendor-released patch: upgrade to Vim 9.2.0735 or later, which escapes the tag field before it is placed into the :vimgrep pattern (see advisory GHSA-mf92-v4xw-j45x at https://github.com/vim/vim/security/advisories/GHSA-mf92-v4xw-j45x and commit 6b611b0d15603c52ebdad17172b0232b4f65704e). Where immediate patching is not possible, the practical compensating control is to avoid invoking C omni-completion (Ctrl-X Ctrl-O) in untrusted C projects and to not open source trees containing tags files from untrusted sources; you can also delete or regenerate the tags file with a trusted ctags run before using completion, at the cost of losing completion until tags are rebuilt. Treating tags files as untrusted input in developer workflows (for example, excluding them from cloned/downloaded repositories) reduces exposure but may disable convenience features for legitimate projects.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in Vim's autoload completion logic for the C language, ccomplete.vim, which builds completion candidates from a ctags-style tags file located in the project directory. When resolving a symbol's type, the script reads the typeref: or typename: extension field from a matching tags entry and embeds it directly into a :vimgrep search pattern, then runs the whole thing via :execute. Ex command parsing honors an unescaped bar (|) as a statement separator, so any bar in that tag field breaks out of the intended :vimgrep and starts a new Ex command. This is a classic CWE-94 (Improper Control of Generation of Code / Code Injection) issue: attacker-influenced data (the tags file) crosses into a code/command context (the :execute'd Ex line) without sanitization. The affected component is the vim/vim product itself (cpe:2.3:a:vim:vim:*), and the trust boundary being violated is the implicit assumption that a project's tags file is benign.

Know when Vim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.4 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Local because the victim must open a malicious file (AV:L) and actively invoke completion (UI:R); no privileges needed (PR:N), and the injected command runs as the user yielding full C/I/A impact.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to 9.2.0735, the C omni-completion script in runtime/autoload/ccomplete.vim interpolates the typeref: or typename: extension field of a tags entry, without escaping, into a :vimgrep pattern that is run through :execute. Because :vimgrep honors the bar as a command separator, a crafted tag field can close the search pattern and append an arbitrary Ex command; opening a hostile .c file whose project tags file contains such an entry and invoking C omni-completion runs that command as the editing user. This issue is fixed in version 9.2.0735.

Executive ViewAI

Why It Matters

Vim versions before 9.2.0735 contain an arbitrary command execution vulnerability in C omni-completion that executes attacker-controlled commands when developers open specially crafted C source files. No public exploit has been identified, but the CVSS 8.4 severity reflects full system compromise risk-attackers could gain access to developer machines and source code repositories. Organizations with C development teams face elevated risk whenever developers work with potentially untrusted source files.

Business Impact: High
Compensating Controls

Disable C omni-completion globally (set omnifunc=); restrict opening C files and tags from external or untrusted sources; implement mandatory code review for any external C code before opening in Vim; run Vim in restricted shells or containers with minimal system privileges; use static analysis tools to pre-scan C files before editing; promote LSP-based editors with sandboxed parsing as interim development environment for C work.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
Vim is a near-default editor across most Linux/Unix developer and server environments
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*

More in Vim

View all
CVE-2022-3520 CRITICAL POC
9.8 Dec 02

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765. Rated critical severity (CVSS 9.8), this vuln

CVE-2022-0729 HIGH POC
8.8 Feb 23

Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4440. Rated high severity (CVSS 8.8), this

CVE-2026-34714 HIGH POC
8.6 Mar 30

Code execution vulnerability in Vim before 9.2.0272 allows attackers to gain immediate arbitrary command execution upon

CVE-2019-12735 HIGH POC
8.6 Jun 05

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via th

CVE-2021-3968 HIGH POC
8.0 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 8.0), this vulnerability is remotely exploita

CVE-2022-1616 HIGH POC
7.8 May 07

Use after free in append_command in GitHub repository vim/vim prior to 8.2.4895. Rated high severity (CVSS 7.8), this vu

CVE-2022-1619 HIGH POC
7.8 May 08

Heap-based Buffer Overflow in function cmdline_erase_chars in GitHub repository vim/vim prior to 8.2.4899. Rated high se

CVE-2021-4136 HIGH POC
7.8 Dec 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3973 HIGH POC
7.8 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3927 HIGH POC
7.8 Nov 05

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2022-2125 HIGH POC
7.8 Jun 19

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability

CVE-2022-2126 HIGH POC
7.8 Jun 19

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability is no a

Vendor StatusVendor

SUSE

Severity: Important
Product Status
Container suse/sl-micro/6.0/baremetal-os-container:2.1.3-6.208 Container suse/sl-micro/6.1/baremetal-os-container:2.2.1-7.138 Affected
Container suse/sl-micro/6.0/toolbox:13.2-9.136 Affected
Container suse/sles/16.0/toolbox:latest Affected
SUSE Linux Enterprise Server 12 SP5-LTSS Fixed
SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy