Vulnerability · Published Jun 11, 2026 · Assigned by GitHub_M
CVE-2026-52860Vim: Arbitrary Code Execution via Python Omni-Completion
High 8.0
In plain English
A high-severity code injection in vim from vim. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Vim is an open source, command line text editor. Prior to version 9.2.0597, Vim's Python omni-completion executes reconstructed function and class definitions from the current buffer with exec() as part of populating the completion dictionary. Python evaluates function default values, parameter annotations, and class base expressions at definition time, so a hostile buffer can execute attacker-controlled Python expressions during omni-completion. The existing g:pythoncomplete_allow_import mitigation (GHSA-52mc-rq6p-rc7c) does not cover this path, because the attacker-controlled code is not a harvested import/from statement. This issue has been patched in version 9.2.0597.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.23 | vim | 9.2.0602-r0 | ALPINE-CVE-2026-52860 |
| Alpine:v3.24 | vim | 9.2.0602-r0 | ALPINE-CVE-2026-52860 |
| Debian:12 | vim | no fix listed | DEBIAN-CVE-2026-52860 |
| Debian:13 | vim | 2:9.1.1230-2+deb13u1 | DEBIAN-CVE-2026-52860 |
| Debian:14 | vim | 2:9.2.0782-1 | DEBIAN-CVE-2026-52860 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3995-1ubuntu2.32 | UBUNTU-CVE-2026-52860 |
| Ubuntu:24.04:LTS | vim | 2:9.1.0016-1ubuntu7.16 | UBUNTU-CVE-2026-52860 |
| Ubuntu:25.10 | vim | 2:9.1.0967-1ubuntu6.7 | UBUNTU-CVE-2026-52860 |
| Ubuntu:26.04:LTS | vim | 2:9.1.2141-1ubuntu4.5 | UBUNTU-CVE-2026-52860 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/vim/vim/security/advisories/GHSA-65p9-mwwx-7468 x_refsource_CONFIRM
- https://github.com/vim/vim/security/advisories/GHSA-52mc-rq6p-rc7c x_refsource_MISC
- https://github.com/vim/vim/commit/c8c63673bc4253212820626aeeb75999d9a539d2 x_refsource_MISC
- https://github.com/vim/vim/releases/tag/v9.2.0597 x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-52860 vdb-entry, x_refsource_REDHAT
- RHBZ#2487987 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52860.json x_sadp-csaf-vex