CVE Database›Document archive›CVE-2026-34982

CVE-2026-34982

vim: arbitrary command execution via modeline sandbox bypass

Loading…

Severity

Important

Red Hat Product Security

8.2

CVSS 3.1

Review impact separately from score.

Published · April 7, 2026

Updated · November 3, 2026

Description

A flaw was found in Vim. A modeline is used to set specific editor options directly from a text file. However, the complete, guitabtooltip, printheader options and the mapset function lack proper security checks, allowing an attacker to bypass restrictions and cause arbitrary OS command execution.

Statement

To exploit this vulnerability, an attacker needs to convince a user to open a specially crafted file. The arbitrary OS command execution is restricted to the privileges of the user running Vim, limiting the potential of a full system compromise.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this issue, disable the modeline support by adding the following command to the Vim configuration file:

set nomodeline

CVSS / CWE

CVSS 3.1 · 8.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

CWE-78 · Improper Neutralization of Special Elements used in an OS Command