CVE Database›Document archive›CVE-2026-52858

CVE-2026-52858

vim: Vim: Arbitrary code execution via Python omni-completion

Loading…

Severity

Important

Red Hat Product Security

7.3

CVSS 3.1

Review impact separately from score.

Published · June 12, 2026

Updated · November 1, 2026

Description

A flaw was found in Vim, a widely used command-line text editor. This vulnerability allows a local attacker to execute arbitrary code on the system. By opening a specially crafted Python file and then triggering the omni-completion feature, the attacker can cause Vim to run malicious code from a sibling Python package. This could lead to a complete compromise of the user's system.

Statement

This is an Important vulnerability in Vim that allows a local attacker to achieve arbitrary code execution. The flaw occurs when a user opens a specially crafted Python file and invokes omni-completion, leading to the execution of malicious code from a co-located Python package. This risk is present in Red Hat Enterprise Linux and other products where Vim is deployed with Python omni-completion enabled, potentially compromising the editing user's system.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Users can mitigate this vulnerability by disabling Python omni-completion in Vim if it is not essential for their workflow. This prevents the execution of untrusted Python code when opening hostile files. To disable this feature, ensure that the omnifunc option in your Vim configuration (e.g., ~/.vimrc) is not set to pythoncomplete#Complete or python3complete#Complete. Alternatively, users should avoid invoking omni-completion (Ctrl-X Ctrl-O) on Python files from untrusted sources. Disabling Python omni-completion may affect Python development functionality within Vim.

CVSS / CWE

CVSS 3.1 · 7.3
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

CWE-94 · Improper Control of Generation of Code ('Code Injection')