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

Published Jun 25, 2026
·
Updated

Last updated 2 July 2026

Other sources

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.

— NVD

Vim: Arbitrary Code Execution via Python Omni-Completion Docstrings

— Microsoft

Affected Software

10 affected componentsFixes available
vim Vim<9.2.0699
vim Vim<9.2.0699
Microsoft azl3 vim 9.2.0620-1<9.2.0735-1
9.2.0735-1
debian/vim*
debian/vim<2:9.1.1230-2+deb13u1
2:9.1.1230-2+deb13u1
debian/vim<2:9.2.0782-1
2:9.2.0782-1
alpine/vim<9.2.0854-r0
9.2.0854-r0
alpine/vim<9.2.0699-r0
9.2.0699-r0
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2
debian/vim<=2:9.0.1378-2+deb12u2, <=2:9.1.1230-2
2:9.1.1230-2+deb13u22:9.2.0858-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 9.2.0735-1
  2. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.1.1230-2+deb13u1
  3. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.2.0782-1
  4. Upgrade

    Upgrade alpine/vim to a version that resolves this vulnerability.

    Fixed in 9.2.0854-r0
  5. Upgrade

    Upgrade alpine/vim to a version that resolves this vulnerability.

    Fixed in 9.2.0699-r0
  6. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.1.1230-2+deb13u2Fixed in 2:9.2.0858-1
  7. Upgrade

    Upgrade Vim (Python omni-completion) to a version that resolves this vulnerability.

    Fixed in 9.2.0699

Event History

Jun 25, 2026
CVE Published
via MITRE·03:16 PM
Data Sourced
via MITRE·03:16 PM
DescriptionWeakness
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·04:16 PM
DescriptionSeverityAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:18 AM
DescriptionSeverityWeaknessAffected Software
Oct 21, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-57456?

CVE-2026-57456 has a high severity score of 8.4 based on the CVSS v4.0 metrics.

2

How does CVE-2026-57456 allow arbitrary code execution?

CVE-2026-57456 allows arbitrary code execution through Python omni-completion that executes function and class definitions with exec() from the current buffer.

3

Which versions of Vim are affected by CVE-2026-57456?

CVE-2026-57456 affects all versions of Vim prior to 9.2.0699.

4

How do I fix CVE-2026-57456?

To fix CVE-2026-57456, upgrade Vim to version 9.2.0699 or later.

5

What types of applications are at risk due to CVE-2026-57456?

Applications that utilize Vim for editing and support Python omni-completion are at risk due to CVE-2026-57456.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203