CVE-2026-34982: Vim modeline sandbox bypass in multiple options

CVE-2026-34982 · Severity: high · CVSS 8.2 · Published 2026-04-06

Vim, a widely used text editor for Linux and Unix-like systems, is vulnerable to a security bypass that allows a malicious file to execute commands on a user's computer. If a user opens a specially crafted text file, an attacker could gain the ability to run arbitrary programs, steal data, or modify files with the same permissions as the user. This occurs because certain editor settings, which are supposed to be restricted for security, can be manipulated through a feature called 'modelines'.

Technologies: Vim. Vendors: Vim.

Quick answers

Is CVE-2026-34982 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-34982 being exploited in the wild.
How severe is CVE-2026-34982?
High severity, with a CVSS score of 8.2, published 6 April 2026.
Which products and versions are affected?
Vim < 9.2.0276.
Is there a fix for CVE-2026-34982?
A patch was published on 2026-03-31: Vim patch 9.2.0276 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-34982 attacked?
It is attacked with local access, in an operating system.
Am I affected by CVE-2026-34982?
Check whether you run Vim at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A modeline sandbox bypass exists in Vim prior to version 9.2.0276. The 'complete', 'guitabtooltip', and 'printheader' options were missing the P_MLE flag, which is intended to prevent dangerous settings from being loaded via modelines. Furthermore, the mapset() function lacked a check_secure() call, allowing it to be invoked from sandboxed expressions to redefine key mappings and execute arbitrary code. An attacker can exploit this by providing a victim with a crafted file that, when opened, executes commands with the privileges of the Vim process. The issue is resolved in patch 9.2.0276.

Affected products

  • Vim Vim < 9.2.0276
  • Red Hat Red Hat Enterprise Linux 8, 9, 10

Timeline

  • 2026-03-31: patched: Vim patch 9.2.0276 released
  • 2026-03-31: advisory: GitHub Advisory GHSA-8h6p-m6gr-mpw9 published
  • 2026-04-06: disclosed: CVE-2026-34982 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.