CVE-2026-52858 Vim: Arbitrary Code Execution via Python Omni-Completion

High 7.3 Published Updated

Attackers can execute arbitrary code by tricking users into opening malicious Python files and triggering omni-completion in Vim.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-52858?

CVE-2026-52858 is a high-severity code injection vulnerability in Vim Vim, published on 11 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Vim is an open source, command line text editor. Prior to version 9.2.0561, the Python omni-completion script in python3complete.vim for Vim with the +python3 interpreter enabled (and the legacy pythoncomplete.vim for builds with the +python interpreter) executes the import and from statements found in the current buffer through Python's import machinery. Because the buffer's working directory is on sys.path, opening a hostile .py file with a sibling Python package and invoking omni-completion runs that package's top-level code as the editing user. This issue has been patched in version 9.2.0561.

Weakness: CWE-95, CWE-94, CWE-829

Which versions are affected by CVE-2026-52858?

It affects 1 product.

Products include Vim Vim.

How do I fix CVE-2026-52858?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-52858 being exploited?

There is no known exploitation of CVE-2026-52858 in the wild and no public exploit code.

All Vim Vim vulnerabilities

Sources

Also known as ALPINE-CVE-2026-52858, AZL-89781, BELL-CVE-2026-52858, CLSA-2026-1782152616, CLSA-2026-1782153265, DEBIAN-CVE-2026-52858 and 6 more.

Is CVE-2026-52858 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free