cve.bz

CVE-2026-52858 vim vim: Code Injection

7.3 highEPSS 0.2%Fix available

High (7.3) in vim vim. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

7.3 high
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 10th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-06-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code (Eval Injection)
CWE-829 Inclusion of Functionality from Untrusted Control Sphere
OWASP Top 10
A05:2025 Injection, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-52858 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-52858?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-52858?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-52858 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
vim:vimbefore 9.2.0561

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12vimno fix listedDEBIAN-CVE-2026-52858
Debian13vim2:9.1.1230-2+deb13u1DEBIAN-CVE-2026-52858 DSA-6600-1
Debian14vim2:9.2.0782-1DEBIAN-CVE-2026-52858
Ubuntu22.04:LTSvim2:8.2.3995-1ubuntu2.32UBUNTU-CVE-2026-52858
Ubuntu24.04:LTSvim2:9.1.0016-1ubuntu7.16UBUNTU-CVE-2026-52858
Ubuntu25.10vim2:9.1.0967-1ubuntu6.7UBUNTU-CVE-2026-52858
Ubuntu26.04:LTSvim2:9.1.2141-1ubuntu4.5UBUNTU-CVE-2026-52858
UbuntuPro:14.04:LTSvim2:7.4.052-1ubuntu3.1+esm29UBUNTU-CVE-2026-52858
UbuntuPro:16.04:LTSvim2:7.4.1689-3ubuntu1.5+esm35UBUNTU-CVE-2026-52858
UbuntuPro:18.04:LTSvim2:8.0.1453-1ubuntu1.13+esm20UBUNTU-CVE-2026-52858
UbuntuPro:20.04:LTSvim2:8.1.2269-1ubuntu5.32+esm8UBUNTU-CVE-2026-52858
Red Hatenterprise_linux:8::appstreamvim-common2:8.0.1763-27.el8_10RHSA-2026:38510
Red Hatenterprise_linux:8::baseosvim2:8.0.1763-27.el8_10RHSA-2026:38510
Red Hatenterprise_linux:9::appstreamvim-common2:8.2.2637-26.el9_8.10RHSA-2026:38511
Red Hatenterprise_linux:9::baseosvim2:8.2.2637-26.el9_8.10RHSA-2026:38511
Red Hatenterprise_linux:10.2vim, vim-common2:9.1.083-9.el10_2.7RHSA-2026:38509
Red Hatenterprise_linux_eus:10.0vim, vim-X11, vim-common and 1 more2:9.1.083-5.el10_0.4RHSA-2026:55431
Red Hathummingbird:1vim, xxd, vim-X11 and 6 more2:9.2.967-1.1.hum1RHSA-2026:57614
Red Hatrhel_e4s:9.2::appstreamvim-X11, vim-common, vim-enhanced and 6 more2:8.2.2637-20.el9_2.3RHSA-2026:72466
Red Hatrhel_e4s:9.2::baseosvim, vim-minimal, vim-debuginfo and 6 more2:8.2.2637-20.el9_2.3RHSA-2026:72466
Red Hatrhel_e4s:9.4::appstreamvim-X11, vim-common, vim-enhanced and 6 more2:8.2.2637-20.el9_4.4RHSA-2026:72465
Red Hatrhel_e4s:9.4::baseosvim, vim-minimal, vim-debuginfo and 6 more2:8.2.2637-20.el9_4.4RHSA-2026:72465
Red Hatrhel_els:6vim, vim-X11, vim-common and 2 more2:7.4.629-5.el6_10.4RHSA-2026:69128
3 more for Red Hat in the JSON and on Red Hat's page.
AlmaLinux8vim-X11, vim-common, vim-minimal and 2 more2:8.0.1763-27.el8_10ALSA-2026:38510
AlmaLinux9vim-X11, vim-common, vim-minimal and 2 more2:8.2.2637-26.el9_8.10ALSA-2026:38511
AlmaLinux10vim-data, vim-filesystem2:9.1.083-9.el10_2.7ALSA-2026:38509
Rocky Linux8vim2:8.0.1763-27.el8_10RLSA-2026:38510
Rocky Linux9vim2:8.2.2637-26.el9_8.10RLSA-2026:38511
Rocky Linux10vim2:9.1.083-9.el10_2.7RLSA-2026:38509
Alpinev3.23, v3.24vim9.2.0498-r0ALPINE-CVE-2026-52858
Azure Linux3vim9.2.0620-1AZL-89781
Alpaquita23, 25, streamvim9.2.0498-r0BELL-CVE-2026-52858

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpine · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important vulnerability in Vim that allows a local attacker to achieve arbitrary code execution. The flaw occurs when a user opens a specially crafted Python file and invokes omni-completion, leading to the execution of malicious code from a co-located Python package. This risk is present in Red Hat Enterprise Linux and other products where Vim is deployed with Python omni-completion enabled, potentially compromising the editing user's system.

Red Hat's mitigation

Users can mitigate this vulnerability by disabling Python omni-completion in Vim if it is not essential for their workflow. This prevents the execution of untrusted Python code when opening hostile files. To disable this feature, ensure that the `omnifunc` option in your Vim configuration (e.g., `~/.vimrc`) is not set to `pythoncomplete#Complete` or `python3complete#Complete`. Alternatively, users should avoid invoking omni-completion (`Ctrl-X Ctrl-O`) on Python files from untrusted sources. Disabling Python omni-completion may affect Python development functionality within Vim.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10vim-2:9.1.083-9.el10_2.7Fixed 2026-07-13RHSA-2026:38509
Red Hat Enterprise Linux 10.0 Extended Update Supportvim-2:9.1.083-5.el10_0.4Fixed 2026-08-17RHSA-2026:55431
Red Hat Enterprise Linux 6 Extended Lifecycle Support - EXTENSIONvim-2:7.4.629-5.el6_10.4Fixed 2026-09-21RHSA-2026:69128
Red Hat Enterprise Linux 7 Extended Lifecycle Supportvim-2:7.4.629-8.el7_9.2Fixed 2026-09-17RHSA-2026:68711
Red Hat Enterprise Linux 8vim-2:8.0.1763-27.el8_10Fixed 2026-07-13RHSA-2026:38510
Red Hat Enterprise Linux 9vim-2:8.2.2637-26.el9_8.10Fixed 2026-07-13RHSA-2026:38511
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionsvim-2:8.2.2637-20.el9_2.3Fixed 2026-09-28RHSA-2026:72466
Red Hat Enterprise Linux 9.4 Update Services for SAP Solutionsvim-2:8.2.2637-20.el9_4.4Fixed 2026-09-28RHSA-2026:72465
Red Hat Enterprise Linux 9.6 Extended Update Supportvim-2:8.2.2637-22.el9_6.4Fixed 2026-09-23RHSA-2026:70818
Red Hat OpenShift Container Platform 4.22openshift/ose-rhel-coreos-9:4.22.9.8.202608130832-0Fixed 2026-08-18RHSA-2026:54769
Red Hat AI Inference Server 3.2rhaiis/model-opt-cuda-rhel9:1790621714Fixed 2026-09-30RHSA-2026:73859
Red Hat AI Inference Server 3.2rhaiis/vllm-cuda-rhel9:1790621718Fixed 2026-09-30RHSA-2026:73929
Red Hat AI Inference Server 3.2rhaiis/vllm-rocm-rhel9:1790621713Fixed 2026-09-30RHSA-2026:73930
Red Hat AI Inference Server 3.5rhaii/vllm-rocm-rhel9:1791425869Fixed 2026-10-13RHSA-2026:82059
Red Hat AI Inference Server 3.5rhaii/vllm-gaudi-rhel9:1791427182Fixed 2026-10-13RHSA-2026:82061
Red Hat AI Inference Server 3.5rhaii/model-opt-cuda-rhel9:1791803821Fixed 2026-10-13RHSA-2026:82066
Red Hat AI Inference Server 3.5rhaii/vllm-cuda-rhel9:1791473631Fixed 2026-10-13RHSA-2026:82368
Red Hat AI Inference Server 3.5rhaii/vllm-spyre-rhel9:1791818357Fixed 2026-10-13RHSA-2026:82371
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Not affected
Red Hat OpenShift Container Platform 5openshift/ose-rhel-coreos-9Affected
52 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-52858.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-829 (13).

References

Check your stackJSON