Bug 79847 - VIM security issues when using modelines
Summary: VIM security issues when using modelines
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: vim   
(Show other bugs)
Version: 2.1
Hardware: All Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
Keywords: Security
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-17 15:03 UTC by Mark J. Cox
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-15 14:28:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mark J. Cox 2002-12-17 15:03:46 UTC
VIM allows a user to set the modeline differently for each edited text file
by placing special comments in the files. These comments can also be
carefully crafted in order to call external programs. An attacker could
create a text file so that when it is opened arbitrary commands are executed.


A workaround to this issue without updating to the new packages is to
disable modelines.  This can be done by placing the following line in the
~/.vimrc user configuration file or in the /usr/share/vim/vim*/macros/vimrc
system-wide configuration file:

set modelines=0

The drawback of this workaround is that any user could still re-enable
modelines by placing 'set modelines=1' in their ~/.vimrc file.

Comment 1 Karsten Hopp 2003-04-15 14:28:40 UTC

Note You need to log in before you can comment on or make changes to this bug.