CVE-2026-52858 Vim: Arbitrary Code Execution via Python Omni-Completion
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.
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.
Other vulnerabilities in Vim Vim
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.