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
debian/vimto a version that resolves this vulnerability.Fixed in 2:9.1.1230-2+deb13u1Fixed in 2:9.2.0858-1 - Upgrade
Upgrade
alpine/vimto a version that resolves this vulnerability.Fixed in 9.2.0498-r0 - 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.