CVE-2026-52858: 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.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.
— 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
debian/vimto a version that resolves this vulnerability.Fixed in 2:9.1.1230-2+deb13u1 - Upgrade
Upgrade
debian/vimto a version that resolves this vulnerability.Fixed in 2:9.2.0782-1 - Upgrade
Upgrade
alpine/vimto a version that resolves this vulnerability.Fixed in 9.2.0498-r0 - Upgrade
Upgrade
debian/vimto a version that resolves this vulnerability.Fixed in 2:9.1.1230-2+deb13u1Fixed in 2:9.2.0782-1 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:7.4.052-1ubuntu3.1+esm29 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:7.4.1689-3ubuntu1.5+esm35 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:8.0.1453-1ubuntu1.13+esm20 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:8.1.2269-1ubuntu5.32+esm8 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:8.2.3995-1ubuntu2.32 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:9.1.0016-1ubuntu7.16 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:9.1.0967-1ubuntu6.7 - Upgrade
Upgrade
ubuntu/vimto a version that resolves this vulnerability.Fixed in 2:9.1.2141-1ubuntu4.5 - Upgrade
Upgrade
Vim (python3complete.vim / pythoncomplete.vim omni-completion)to a version that resolves this vulnerability.Fixed in 9.2.0561
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52858?
The severity of CVE-2026-52858 is rated as high with a CVSS score of 7.3.
How do I fix CVE-2026-52858?
To fix CVE-2026-52858, upgrade Vim to version 9.2.0561 or later.
What type of vulnerability is CVE-2026-52858?
CVE-2026-52858 is a code injection vulnerability that allows arbitrary code execution.
Which versions of Vim are affected by CVE-2026-52858?
Versions prior to 9.2.0561 of Vim with the +python3 interpreter enabled are affected by CVE-2026-52858.
What impact does CVE-2026-52858 have on Vim users?
CVE-2026-52858 allows attackers to execute arbitrary code via the Python omni-completion feature.