CVE Database›CVE-2016-1248

CVE-2016-1248

vim: Lack of validation of values for few options results in code exection

Loading…

Severity

Moderate

Red Hat Product Security

7.5

CVSS 3.0

Review impact separately from score.

Published · November 20, 2016

Updated · June 27, 2026

Description

A vulnerability was found in vim in how certain modeline options were treated. An attacker could craft a file that, when opened in vim with modelines enabled, could execute arbitrary commands with privileges of the user running vim.

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

Disabling modeline support in .vimrc by adding "set nomodeline" will prevent exploitation of this flaw. By default, modeline is enabled for ordinary users but disabled for root.

CVSS / CWE

CVSS 3.0 · 7.5
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

CVSS 2.0 · 6.8
AV:N/AC:M/Au:N/C:P/I:P/A:P

CWE-94 · Improper Control of Generation of Code ('Code Injection')