Code Injection in Vim - CVE-2026-57456

 

Code Injection in Vim - CVE-2026-57456

Published: June 22, 2026


Vulnerability identifier: #VU134978
CSH Severity: High
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-57456
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code.

The vulnerability exists due to improper control of code generation in Python omni-completion docstring handling in runtime/autoload/python3complete.vim and pythoncomplete.vim when processing a hostile Python buffer during omni-completion. A remote attacker can craft a malicious docstring and convince a user to trigger Python omni-completion to execute arbitrary code.

User interaction is required to open or edit a hostile Python buffer and trigger Python omni-completion. Only builds with +python3 or +python support are affected.


Affected software

Vim
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for x86_64
Ubuntu
openEuler
vim (Ubuntu package)
vim (Red Hat package)
vim-X11
vim-filesystem
vim-minimal
vim-enhanced
vim-debugsource
vim-debuginfo
vim-common
vim

How to mitigate CVE-2026-57456

Install security update from vendor's website.

Vim - update to 9.2.0699
vim (Ubuntu package) - addressed in versions 2:7.4.052-1ubuntu3.1+esm30, 2:7.4.1689-3ubuntu1.5+esm36, 2:8.0.1453-1ubuntu1.13+esm21, 2:8.1.2269-1ubuntu5.32+esm9, 2:8.2.3995-1ubuntu2.33, 2:9.1.0016-1ubuntu7.17, 2:9.1.0967-1ubuntu6.8, 2:9.1.2141-1ubuntu4.6
vim (Red Hat package) - addressed in versions 8.0.1763-31.el8_10, 8.2.2637-26.el9_8.13
vim-X11 - update to 9.0.2092-38
vim-filesystem - update to 9.0.2092-38
vim-minimal - update to 9.0.2092-38
vim-enhanced - update to 9.0.2092-38
vim-debugsource - update to 9.0.2092-38
vim-debuginfo - update to 9.0.2092-38
vim-common - update to 9.0.2092-38
vim - update to 9.0.2092-38

External References

Related Security Bulletins