CVE-2026-52860 Vim: Arbitrary Code Execution via Python Omni-Completion
Attackers can execute arbitrary code by crafting a hostile buffer that triggers Python omni-completion in Vim, requiring users to upgrade to the patched version.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-52860?
CVE-2026-52860 is a high-severity code injection vulnerability in Vim Vim, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, 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.0597, Vim's Python omni-completion executes reconstructed function and class definitions from the current buffer with exec() as part of populating the completion dictionary. Python evaluates function default values, parameter annotations, and class base expressions at definition time, so a hostile buffer can execute attacker-controlled Python expressions during omni-completion. The existing g:pythoncomplete_allow_import mitigation (GHSA-52mc-rq6p-rc7c) does not cover this path, because the attacker-controlled code is not a harvested import/from statement. This issue has been patched in version 9.2.0597.
Weakness: CWE-94
Which versions are affected by CVE-2026-52860?
It affects 1 product.
Products include Vim Vim.
How do I fix CVE-2026-52860?
Upgrade to a fixed version.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-52860 being exploited?
There is no known exploitation of CVE-2026-52860 in the wild and no public exploit code.
Other vulnerabilities in Vim Vim
Sources
Also known as ALPINE-CVE-2026-52860, AZL-89769, BELL-CVE-2026-52860, CLSA-2026-1782299449, CLSA-2026-1782299648, DEBIAN-CVE-2026-52860 and 5 more.