CVE-2026-57456 Vim: Arbitrary Code Execution via Python Omni-Completion Docstrings

High 8.4 Published Updated

Attackers can execute arbitrary Python code by crafting a hostile buffer that exploits Vim's Python omni-completion feature.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-57456?

CVE-2026-57456 is a high-severity code injection vulnerability in Vim Vim, published on 25 Jun 2026. It can only be exploited from the same machine or local network, 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 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: CWE-94

Which versions are affected by CVE-2026-57456?

It affects 1 product.

Products include Vim Vim.

How do I fix CVE-2026-57456?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-57456 being exploited?

There is no known exploitation of CVE-2026-57456 in the wild and no public exploit code.

All Vim Vim vulnerabilities

Sources

Also known as ALPINE-CVE-2026-57456, AZL-91110, BELL-CVE-2026-57456, CLSA-2026-1783075843, CLSA-2026-1783079038, CLSA-2026-1783787785 and 8 more.

Is CVE-2026-57456 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free