CVE-2026-34982 Vim modeline bypass via various options affects Vim < 9.2.0276
Attackers can execute arbitrary OS commands by tricking users into opening crafted files due to a modeline sandbox bypass in Vim.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-34982?
CVE-2026-34982 is a high-severity command injection vulnerability in Vim Vim, published on 6 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Vim is an open source, command line text editor. Prior to version 9.2.0276, a modeline sandbox bypass in Vim allows arbitrary OS command execution when a user opens a crafted file. The `complete`, `guitabtooltip` and `printheader` options are missing the `P_MLE` flag, allowing a modeline to be executed. Additionally, the `mapset()` function lacks a `check_secure()` call, allowing it to be abused from sandboxed expressions. Commit 9.2.0276 fixes the issue.
Weakness: CWE-78
Which versions are affected by CVE-2026-34982?
It affects 1 product.
Linux distribution packages (40)
vim-X11 AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-common AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-data AlmaLinux:10 | All versions | 2:9.1.083-6.el10_1.4 |
vim-data AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-enhanced AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-filesystem AlmaLinux:10 | All versions | 2:9.1.083-6.el10_1.4 |
vim-filesystem AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-minimal AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
xxd AlmaLinux:10 | All versions | 2:9.1.083-9.el10_2.2 |
vim-X11 AlmaLinux:8 | All versions | 2:8.0.1763-22.el8_10.3 |
vim-common AlmaLinux:8 | All versions | 2:8.0.1763-22.el8_10.3 |
vim-enhanced AlmaLinux:8 | All versions | 2:8.0.1763-22.el8_10.3 |
vim-filesystem AlmaLinux:8 | All versions | 2:8.0.1763-22.el8_10.3 |
vim-minimal AlmaLinux:8 | All versions | 2:8.0.1763-22.el8_10.3 |
vim-X11 AlmaLinux:9 | All versions | 2:8.2.2637-23.el9_7.3 |
vim-X11 AlmaLinux:9 | All versions | 2:8.2.2637-26.el9_8.4 |
vim-common AlmaLinux:9 | All versions | 2:8.2.2637-23.el9_7.3 |
vim-common AlmaLinux:9 | All versions | 2:8.2.2637-26.el9_8.4 |
vim-enhanced AlmaLinux:9 | All versions | 2:8.2.2637-23.el9_7.3 |
vim-enhanced AlmaLinux:9 | All versions | 2:8.2.2637-26.el9_8.4 |
vim-filesystem AlmaLinux:9 | All versions | 2:8.2.2637-23.el9_7.3 |
vim-filesystem AlmaLinux:9 | All versions | 2:8.2.2637-26.el9_8.4 |
vim-minimal AlmaLinux:9 | All versions | 2:8.2.2637-23.el9_7.3 |
vim-minimal AlmaLinux:9 | All versions | 2:8.2.2637-26.el9_8.4 |
vim Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-X11 Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-X11-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-common Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-data Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-debugsource Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-enhanced Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-enhanced-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-filesystem Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-minimal Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim-minimal-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
xxd Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
xxd-debuginfo Red Hat:enterprise_linux:10.1 | All versions | 2:9.1.083-6.el10_1.4 |
vim Red Hat:enterprise_linux:10.2 | All versions | 2:9.1.083-9.el10_2.2 |
vim-X11 Red Hat:enterprise_linux:10.2 | All versions | 2:9.1.083-9.el10_2.2 |
Products include Vim Vim.
How do I fix CVE-2026-34982?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-34982 being exploited?
There is no known exploitation of CVE-2026-34982 in the wild and no public exploit code.
Other vulnerabilities in Vim Vim
Sources
Also known as ALPINE-CVE-2026-34982, ALSA-2026:11389, ALSA-2026:11509, ALSA-2026:11510, ALSA-2026:19073, ALSA-2026:19224 and 23 more.