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.
Published: 2026-04-06
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

A modeline sandbox bypass in Vim allows arbitrary OS command execution when a user opens a specially crafted file. The missing P_MLE flag in several options enables the modeline to run commands. In addition, mapset() can be abused by sandboxed expressions. The vulnerability is a classic command injection flaw (CWE‑78) that can compromise confidentiality, integrity, and availability by allowing an attacker to run system commands with the privileges of the Vim process.

Affected Systems

The flaw affects the open‑source Vim text editor, specifically all releases older than 9.2.0276. Users of Vim 9.2.0275 and earlier are susceptible. The vulnerability is present in the main Vim distribution (vim:vim) and any derivative that has not applied the patch from commit 75661a66a1db1e1f3f1245c615.

Risk and Exploitability

The CVSS score of 8.2 reflects high severity. The EPSS score is not reported, but the vulnerability is not listed in CISA's KEV catalog, indicating no known widespread exploitation. The likely attack vector is local or when an attacker can prompt a user to open a crafted file, such as through a shared drive or email attachment. Exploitation requires no special permissions beyond the victim’s Vim session, making it an attractive target for attackers seeking privilege escalation on a compromised machine.

Generated by OpenCVE AI on April 6, 2026 at 17:37 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply Vim update 9.2.0276 or newer to resolve the issue.
  • If updating is not immediately possible, disable modeline parsing by setting the 'modeline' option to off until a patch is applied.
  • Avoid using the 'complete', 'guitabtooltip', or 'printheader' options with untrusted files.
  • Do not execute 'mapset()' in sandboxed or untrusted expressions.
  • Verify the integrity of Vim binaries and ensure they match official signatures.

Generated by OpenCVE AI on April 6, 2026 at 17:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 07 Apr 2026 00:00:00 +0000

Type Values Removed Values Added
First Time appeared Vim
Vim vim
Vendors & Products Vim
Vim vim
References
Metrics threat_severity

None

threat_severity

Important


Mon, 06 Apr 2026 16:45:00 +0000

Type Values Removed Values Added
References
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 06 Apr 2026 15:30:00 +0000

Type Values Removed Values Added
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.
Title Vim modeline bypass via various options affects Vim < 9.2.0276
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-07T03:56:01.436Z

Reserved: 2026-03-31T19:38:31.617Z

Link: CVE-2026-34982

cve-icon Vulnrichment

Updated: 2026-04-06T15:19:17.901Z

cve-icon NVD

Status : Undergoing Analysis

Published: 2026-04-06T16:16:38.777

Modified: 2026-04-07T13:20:11.643

Link: CVE-2026-34982

cve-icon Redhat

Severity : Important

Publid Date: 2026-04-06T15:16:48Z

Links: CVE-2026-34982 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-06T21:32:23Z

Weaknesses