CVE-2026-59858

Vim: Arbitrary Code Execution via C Omni-Completion

Published Jul 9, 2026 CVSS 4.0 · 8.4 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The error occurs within Vim’s C omni‑completion script that interpolates the typeref: or typename: extension field of a tags entry into a :vimgrep pattern without proper escaping. Because the pattern is then executed by Vim’s :execute command, a maliciously crafted tags entry can terminate the search pattern and append an arbitrary Ex command. When a user with editing privileges opens a .c file whose project tags file contains such a malicious entry and invokes C omni‑completion, Vim executes that injected Ex command as the editing user, resulting in arbitrary code execution.

Affected Systems

All versions of Vim older than 9.2.0735 are affected, including release series 9.1.x and earlier as well as the current 9.2 branch before patch u0735. Systems that use the default C omni‑completion routine and load project tags files containing untrusted entries are vulnerable.

Risk and Exploitability

The CVSS score of 8.4 indicates a high severity vulnerability. However, the EPSS score of <1% indicates a very low exploitation probability. The issue is not listed in CISA’s KEV catalog. The attack vector is local, requiring an attacker to provide a malicious tags file to a user who opens a .c source file and triggers C omni‑completion. Once executed entire system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Vim to version 9.2.0735 or later, where the injection issue is fixed.
  • Remove or sanitize any typeref: or typename: entries in project tags files that could contain untrusted data.
  • Disable C omni‑completion for files that load external tags, or configure Vim to use a safe tags file environment.
  • If upgrading is not immediately possible, consider to prevent execution of injected commands.

Generated by OpenCVE AI on August 1, 2026 at 13:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8541-1 Vim vulnerabilities
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim
Type Values Removed Values Added
Description 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.
Title Vim: Arbitrary Code Execution via C Omni-Completion
Weaknesses CWE-94
References
Metrics cvssV4_0

{'score': 8.4, 'vector': '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'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 14, 2026, 3:55 AM
Reserved
Jul 7, 2026, 3:41 PM
Status
Analyzed
Published
Jul 9, 2026, 11:17 PM
Modified
Jul 14, 2026, 5:16 AM
Severity
Moderate
Public date
Jul 9, 2026, 10:37 PM