Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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
Version: 2.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
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:
Clone Of:
Last Closed: 2003-04-15 14:28:40 UTC
Target Upstream Version:

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.