Description
Vim is an open source, command line text editor. Prior to 9.2.0736, the PHP omni-completion script in runtime/autoload/phpcomplete.vim interpolates a class or trait name, taken from the contents of the edited buffer, into a search() pattern that is run via win_execute() without escaping. A name containing a single quote can terminate the search() string argument early, and because the bar is honored as an Ex command separator, the remainder of the name is run as Ex commands; via the :! command this allows arbitrary operating-system command execution when a victim opens a crafted PHP file and invokes omni-completion. This issue is fixed in version 9.2.0736.
Published: 2026-07-09
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Vim's Omni-Completion feature for PHP fails to escape class or trait names that are read from the current buffer. A name containing a single quote can terminate the win_execute() argument early, letting attackers insert arbitrary Ex commands that are passed to :! and executed by the operating system. The resulting vulnerability allows an attacker who can open a crafted PHP file and invoke omni-completion to run arbitrary commands, compromising the confidentiality, integrity, and availability of the system running Vim.

Affected Systems

The issue affects Vim versions prior to 9.2.0736, specifically the vim:vim product. The insecure PHP Omni-Completion script is located in runtime/autoload/phpcomplete.vim. Users who run older Vim releases on any platform that supports this feature are susceptible.

Risk and Exploitability

The CVSS score is 8.4, indicating high severity. The EPSS score of < 1% indicates a very low probability of exploitation, and the vulnerability is not listed in CISA's KEV catalog. Because the flaw runs operating‑system commands with the user's privileges, exploitation can result in full remote command execution against the account running Vim. The attack requires a victim to edit a crafted PHP file and invoke omni-completion; based on the description, it is inferred that the likely attack vector is local or session‑based. The lack of published exploits does not diminish the risk; the flaw is straightforward to exploit once the conditions are met.

Generated by OpenCVE AI on July 29, 2026 at 11:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Vim to release 9.2.0736 or later, where the PHP omni‑completion script has been fixed to properly escape input and remove the win_execute() call.
  • If an upgrade is not immediately possible, disable the omni‑completion feature for PHP by setting the 'omnifunc' option to an empty string or removing the plugin from runtime paths, preventing the vulnerable code from being loaded.
  • As a temporary precaution, configure Vim to disallow the use of the :! command globally or within the session by setting the 'shell' option to a safe path or using the 'noshell' setting, limiting the ability to execute arbitrary OS commands.

Generated by OpenCVE AI on July 29, 2026 at 11:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 13 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Sun, 12 Jul 2026 03:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 10 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim

Thu, 09 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Description Vim is an open source, command line text editor. Prior to 9.2.0736, the PHP omni-completion script in runtime/autoload/phpcomplete.vim interpolates a class or trait name, taken from the contents of the edited buffer, into a search() pattern that is run via win_execute() without escaping. A name containing a single quote can terminate the search() string argument early, and because the bar is honored as an Ex command separator, the remainder of the name is run as Ex commands; via the :! command this allows arbitrary operating-system command execution when a victim opens a crafted PHP file and invokes omni-completion. This issue is fixed in version 9.2.0736.
Title Vim: Arbitrary Code Execution via PHP 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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-14T03:55:39.477Z

Reserved: 2026-07-07T15:41:53.606Z

Link: CVE-2026-59856

cve-icon Vulnrichment

Updated: 2026-07-10T14:44:50.900Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-09T22:39:01Z

Links: CVE-2026-59856 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T11:45:03Z

Weaknesses
  • CWE-94

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