Code Injection in Vim - CVE-2026-52858

 

Code Injection in Vim - CVE-2026-52858

Published: June 1, 2026


Vulnerability identifier: #VU133142
CSH Severity: Medium
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-52858
CWE-ID: CWE-94
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to execute arbitrary code.

The vulnerability exists due to improper control of code generation in python omni-completion in python3complete.vim when processing a crafted Python file during omni-completion. A local user can place a crafted Python file with attacker-controlled import statements and a sibling package in the working directory to execute arbitrary code.

User interaction is required to invoke omni-completion with CTRL-X CTRL-O while editing the crafted Python file, and the issue affects builds with the Python interpreter enabled and filetype plugins active.


Affected software

Vim
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
vim (Ubuntu package)
vim (Red Hat package)
vim-common
vim-X11
vim-debuginfo
vim-debugsource
vim-enhanced
vim-minimal
vim-filesystem
vim
vim-doc
vim-data
Red Hat Enterprise Linux Server - AUS
Ubuntu
openEuler
Anolis OS

How to mitigate CVE-2026-52858

Install security update from vendor's website.

Vim - update to 9.2.0561
vim (Ubuntu package) - addressed in versions 2:7.4.052-1ubuntu3.1+esm29, 2:7.4.1689-3ubuntu1.5+esm35, 2:8.0.1453-1ubuntu1.13+esm20, 2:8.1.2269-1ubuntu5.32+esm8, 2:8.2.3995-1ubuntu2.32, 2:9.1.0016-1ubuntu7.16, 2:9.1.0967-1ubuntu6.7, 2:9.1.2141-1ubuntu4.5
vim (Red Hat package) - addressed in versions 7.4.629-5.el6_10.4, 7.4.629-8.el7_9.2, 8.2.2637-20.el9_2.3, 8.2.2637-20.el9_4.4
vim-common - addressed in versions 9.0-50, 9.0.2092-36
vim-X11 - addressed in versions 9.0-50, 9.0.2092-36
vim-debuginfo - addressed in versions 9.0-50, 9.0.2092-36
vim-debugsource - addressed in versions 9.0-50, 9.0.2092-36
vim-enhanced - addressed in versions 9.0-50, 9.0.2092-36
vim-minimal - addressed in versions 9.0-50, 9.0.2092-36
vim-filesystem - addressed in versions 9.0-50, 9.0.2092-36
vim - addressed in versions 9.0-50, 9.0.2092-36
vim-filesystem - update to 9.0.2092-25
vim-doc - update to 9.0.2092-25
vim-data - update to 9.0.2092-25
vim-minimal - update to 9.0.2092-25
vim-enhanced - update to 9.0.2092-25
vim-common - update to 9.0.2092-25
vim-X11 - update to 9.0.2092-25

External References

Related Security Bulletins