Bug 79847 - VIM security issues when using modelines
VIM security issues when using modelines
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: vim (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
: Security
Depends On:
  Show dependency treegraph
Reported: 2002-12-17 10:03 EST by Mark J. Cox
Modified: 2007-11-30 17:06 EST (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Mark J. Cox 2002-12-17 10:03:46 EST
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 10:28:40 EDT

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