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

Published Jun 11, 2026
·
Updated

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

9 affected componentsFixes available
vim Vim<9.2.0561
vim Vim<9.2.0561
Microsoft azl3 vim 9.2.0488-1<9.2.0620-1
9.2.0620-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
debian/vim<=2:9.0.1378-2+deb12u2, <=2:9.1.1230-2
2:9.1.1230-2+deb13u12:9.2.0858-1
alpine/vim<9.2.0498-r0
9.2.0498-r0
alpine/vim<9.2.0498-r0
9.2.0498-r0

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.0620-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 debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.1.1230-2+deb13u1Fixed in 2:9.2.0858-1
  5. Upgrade

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

    Fixed in 9.2.0498-r0
  6. Upgrade

    Upgrade Vim (python3complete.vim / pythoncomplete.vim omni-completion) to a version that resolves this vulnerability.

    Fixed in 9.2.0561

Event History

Jun 11, 2026
CVE Published
via MITRE·06:32 PM
Data Sourced
via MITRE·06:32 PM
DescriptionWeakness
Data Sourced
via Red Hat·07:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·07:16 PM
DescriptionSeverityAffected Software
Jun 13, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

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.

2

How do I fix CVE-2026-52858?

To fix CVE-2026-52858, upgrade Vim to version 9.2.0561 or later.

3

What type of vulnerability is CVE-2026-52858?

CVE-2026-52858 is a code injection vulnerability that allows arbitrary code execution.

4

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.

5

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.

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