Vim<9.2.0699 : Python omnicompletion exec() injection
CVE-2026-57456 Published on June 25, 2026
Vim: Arbitrary Code Execution via Python Omni-Completion Docstrings
Vim is an open source, command line text editor. Prior to 9.2.0699, Vim's Python omni-completion (runtime/autoload/python3complete.vim and the legacy pythoncomplete.vim) executes reconstructed function and class definitions from the current buffer with exec() as part of populating the completion dictionary. When reconstructing that source, each scope's docstring is inserted verbatim between triple quotes with no escaping, so a hostile buffer can break out of the triple-quoted literal and execute attacker-controlled Python during omni-completion. This vulnerability is fixed in 9.2.0699.
Weakness Type
What is a Code Injection Vulnerability?
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CVE-2026-57456 has been classified to as a Code Injection vulnerability or weakness.
Products Associated with CVE-2026-57456
Want to know whenever a new CVE is published for Vim? stack.watch will email you.