CVE-2026-52860: Vim: Arbitrary Code Execution via Python Omni-Completion
Last updated 19 June 2026
Other sources
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:pythoncompleteallowimport 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.
— MITRE
Vim: Arbitrary Code Execution via Python Omni-Completion
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 9.2.0620-1 - Upgrade
Upgrade
Vimto a version that resolves this vulnerability.Fixed in 9.2.0597
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52860?
CVE-2026-52860 has a high severity rating of 7.5 according to the CVSS.
How do I fix CVE-2026-52860?
To mitigate CVE-2026-52860, upgrade to Vim version 9.2.0597 or later.
What type of vulnerability is CVE-2026-52860?
CVE-2026-52860 is classified as a Code Injection vulnerability.
What does CVE-2026-52860 affect?
CVE-2026-52860 affects versions of Vim prior to 9.2.0597 that utilize Python omni-completion.
What is the potential impact of CVE-2026-52860?
The potential impact of CVE-2026-52860 is arbitrary code execution due to the improper handling of Python function definitions.